#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;
} 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) {