Browse Source

bitmap lib: use bit manipulation

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@52048 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 13 years ago
parent
commit
191b4610c8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/bitmap/sparse.c

+ 2 - 2
lib/bitmap/sparse.c

@@ -23,8 +23,8 @@
 #include <grass/bitmap.h>
 
 
-#define BM_col_to_byte(x)  ((x)/8)
-#define BM_col_to_bit(x)   ((x)%8)
+#define BM_col_to_byte(x)  ((x) >> 3)  /* x / 8 */
+#define BM_col_to_bit(x)   ((x) & 7)   /* x % 8 */
 
 static int depth;