OSDN Git Service

Fix taking into account of results of CppChecker
authorTetsu R. Satoh <tetsu.sato@nhn-playart.com>
Mon, 9 Sep 2013 04:38:06 +0000 (13:38 +0900)
committerTetsu R. Satoh <tetsu.sato@nhn-playart.com>
Mon, 9 Sep 2013 04:38:06 +0000 (13:38 +0900)
src/filter.cc

index 419af11..50f2223 100644 (file)
@@ -162,9 +162,7 @@ bool Filter::resampling()
 //    for(int i=1;i<((int)m-2);++i)
     for(int i=1;i<=x.size();++i)
     {
-      double a1=0.0, a2=0.0;
-      a1 = psuma[i-1];
-      a2 = psuma[i];
+      double a1 = psuma[i-1], a2 = psuma[i];
 //cout<<a1<<"<"<<u*alphasum<<"<="<<a2<<"?"<<endl;
 //cout<<a1/alphasum<<"<"<<u<<"<="<<a2/alphasum<<"?"<<endl;
 //cout<<(u<=a2/alphasum)<<"?"<<endl;
@@ -183,4 +181,4 @@ bool Filter::resampling()
   }
   x = f;
   return(true);
-}
\ No newline at end of file
+}