]> 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 55406bb5b38a1933356e7d2750de3b1c0de1762f..13f81e3a324fd28bb2432d887fa6d17511e95266 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 5360b02359a4f33521a20fa00aa530ee808d45ed..7584d94a62403fddb8c4d45f9bf383ac9743c342 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;