Code

Fixed and disabled extra debugging routines in pixblock scaler and transformer
authorkiirala <kiirala@users.sourceforge.net>
Thu, 4 Jan 2007 09:37:32 +0000 (09:37 +0000)
committerkiirala <kiirala@users.sourceforge.net>
Thu, 4 Jan 2007 09:37:32 +0000 (09:37 +0000)
src/display/pixblock-scaler.cpp
src/display/pixblock-transform.cpp

index 3be52c3f30878ab6f2bb5485129712e206acaa20..c5acaace0b3e5f4f033accc3ac7457715e031dcd 100644 (file)
@@ -80,9 +80,9 @@ inline unsigned char samplex(const int a, const int b, const int c, const int d,
  */
 inline void _check_index(NRPixBlock const * const pb, int const location, int const line)
 {
-    if(true) {
+    if(false) {
         int max_loc = pb->rs * (pb->area.y1 - pb->area.y0);
-        if (location < 0 || (location + 4) >= max_loc)
+        if (location < 0 || (location + 4) > max_loc)
             g_warning("Location %d out of bounds (0 ... %d) at line %d", location, max_loc, line);
     }
 }
index 1a691b5a8b006b8bc2b341795a3167aaf7b35e55..7aa616eb3f30f0bd8e56ce4221ca4ed69e3d1bf3 100644 (file)
@@ -31,9 +31,9 @@ struct RGBA {
  */
 inline void _check_index(NRPixBlock const * const pb, int const location, int const line)
 {
-    if(true) {
+    if(false) {
         int max_loc = pb->rs * (pb->area.y1 - pb->area.y0);
-        if (location < 0 || (location + 4) >= max_loc)
+        if (location < 0 || (location + 4) > max_loc)
             g_warning("Location %d out of bounds (0 ... %d) at line %d", location, max_loc, line);
     }
 }