]> Creatis software - clitk.git/commitdiff
MSVC++ seems a bit more strict than gcc with c++...
authorsrit <srit>
Sat, 26 Mar 2011 21:21:13 +0000 (21:21 +0000)
committersrit <srit>
Sat, 26 Mar 2011 21:21:13 +0000 (21:21 +0000)
registration/clitkDemonsDeformableRegistrationGenericFilter.txx
tools/clitkImageExtractLine.cxx

index 55406bb..13f81e3 100755 (executable)
@@ -348,7 +348,7 @@ namespace clitk
     //------------------------------------
     //Set the number of iterations
     //------------------------------------
-    unsigned int nIterations[nLevels];
+    itk::Array<unsigned int> nIterations(nLevels);
     for (unsigned int i=0 ; i<nLevels; i++)
       {
        if (m_ArgsInfo.maxIter_given==nLevels)
@@ -369,7 +369,7 @@ namespace clitk
     //------------------------------------
     //Set the max RMS error for the field update
     //------------------------------------
-    double maxRMSError[nLevels];
+    itk::Array<double> maxRMSError[nLevels];
     for (unsigned int i=0 ; i<nLevels; i++)
       {
        if (m_ArgsInfo.maxRMSError_given==nLevels)      
@@ -387,7 +387,7 @@ namespace clitk
     //------------------------------------
     //Get the stop criterion
     //------------------------------------
-    int stop[nLevels];
+    itk::Array<int> stop(nLevels);
     for (unsigned int i=0; i<nLevels; i++)
       if (m_ArgsInfo.stop_given==nLevels)
        stop[i]=m_ArgsInfo.stop_arg[i];
index 5360b02..7584d94 100644 (file)
@@ -136,7 +136,7 @@ int main(int argc, char * argv[])
       DD(dim);
       DD(direction);
       
-      double val[dim[b]];
+      std::vector<double> val(dim[b]);
        for (int i=0; i<dim[b]; i++)
          val[i]=0;