r10675: remove commands commented-out
[ctsim.git] / libctsim / backprojectors.cpp
index d38b7189f6b6c878b09ec0549dca5daf242ce24e..ef1ef12e655738f3b1e1b06bd13fbba148f38b28 100644 (file)
@@ -588,7 +588,7 @@ BackprojectIntDiff::BackprojectView (const double* const filteredProj, const dou
 #elif SIZEOF_LONG == 8
   static const int scaleShift = 32;
 #endif
-  static const long scale = (1 << scaleShift);
+  static const long scale = (1L << scaleShift);
   static const long scaleBitmask = scale - 1;
   static const long halfScale = scale / 2;
   static const double dInvScale = 1. / scale;
@@ -631,10 +631,10 @@ BackprojectIntDiff::BackprojectView (const double* const filteredProj, const dou
     } else if (interpType == Backprojector::INTERP_LINEAR) {
       for (int iy = 0; iy < ny; iy++, curDetPos += det_dy) {
         const long iDetPos = curDetPos >> scaleShift;
-        const long detRemainder = curDetPos & scaleBitmask;
-        if (iDetPos >= 0 && iDetPos <= iLastDet)
-           *pImCol++ += filteredProj[iDetPos] + (detRemainder * deltaFilteredProj[iDetPos]);
-           
+        if (iDetPos >= 0 && iDetPos <= iLastDet) {
+         const long detRemainder = curDetPos & scaleBitmask;
+         *pImCol++ += filteredProj[iDetPos] + (detRemainder * deltaFilteredProj[iDetPos]);
+       }
       }        // end for iy
     } else if (interpType == Backprojector::INTERP_CUBIC) {
       for (int iy = 0; iy < ny; iy++, curDetPos += det_dy) {