ostr << std::endl;
if (ConfigVariable::isPrintCompact() == false)
{
- ostr << std::endl;
+ ostr << std::endl;
}
scilabWriteW(ostr.str().c_str());
std::wostringstream ostrName;
(pEnd->isPoly() || pEnd->isDouble()))
{
// No need to kill piStart, ... because Implicit list ctor will incref them
- setResult(new types::ImplicitList(pStart, pStep, pEnd));
+ types::ImplicitList* pIL = new types::ImplicitList(pStart, pStep, pEnd);
+ try
+ {
+ pIL->compute();
+ }
+ catch (const InternalError& ie)
+ {
+ // happends when compute() of ImplicitList cannot allocate memory
+ pIL->killMe();
+ throw ie;
+ }
+
+ setResult(pIL);
CoverageInstance::stopChrono((void*)&e);
return;
}
pStep->isDouble()))
{
// No need to kill piStart, ... because Implicit list ctor will incref them
- setResult(new types::ImplicitList(pStart, pStep, pEnd));
+ types::ImplicitList* pIL = new types::ImplicitList(pStart, pStep, pEnd);
+ try
+ {
+ pIL->compute();
+ }
+ catch (const InternalError& ie)
+ {
+ // happends when compute() of ImplicitList cannot allocate memory
+ pIL->killMe();
+ throw ie;
+ }
+
+ setResult(pIL);
CoverageInstance::stopChrono((void*)&e);
return;
}
if (m_iDims == 2)
{
- Cell * pC = new Cell();
+ Cell * pC = new Cell(getCols(), getRows());
out = pC;
- InternalType** pIT = NULL;
- int piDims[2] = {getCols(), getRows()};
- pC->create(piDims, 2, &pIT, NULL);
-
for (int i = 0, k = 0; i < getCols(); i++, k += getRows())
{
for (int j = 0, l = 0; j < getRows(); j++, l += getCols())
{
- pC->m_pRealData[i + l] = m_pRealData[j + k]->clone();
- pC->m_pRealData[i + l]->IncreaseRef();
+ pC->set(i + l, m_pRealData[j + k]);
}
}
-
+
return true;
}