- if (theType == CurveCreator_Operation::RemovePoints) {
- int *pData = (int *)allocate(3*sizeof(int));
+ if (theType == CurveCreator_Operation::Join)
+ {
+ const int aNbPoints = theParamList.size();
+
+ const size_t aSize =
+ sizeof(aNbPoints) +
+ aNbPoints * (sizeof(int));
+
+ int *pIntData = (int *)allocate(aSize);
+
+ *pIntData++ = aNbPoints;
+ std::list<int>::const_iterator anIt = theParamList.begin(), aLast = theParamList.end();
+ for ( ; anIt != aLast; anIt++ )
+ *pIntData++ = *anIt;