[GRASS-SVN] r52048 - grass/trunk/lib/bitmap
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jun 12 06:20:44 PDT 2012
Author: mmetz
Date: 2012-06-12 06:20:39 -0700 (Tue, 12 Jun 2012)
New Revision: 52048
Modified:
grass/trunk/lib/bitmap/sparse.c
Log:
bitmap lib: use bit manipulation
Modified: grass/trunk/lib/bitmap/sparse.c
===================================================================
--- grass/trunk/lib/bitmap/sparse.c 2012-06-12 12:42:53 UTC (rev 52047)
+++ grass/trunk/lib/bitmap/sparse.c 2012-06-12 13:20:39 UTC (rev 52048)
@@ -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;
More information about the grass-commit
mailing list