Changeset 52048


Ignore:
Timestamp:
Jun 12, 2012 6:20:39 AM (4 years ago)
Author:
mmetz
Message:

bitmap lib: use bit manipulation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • grass/trunk/lib/bitmap/sparse.c

    r52042 r52048  
    2424
    2525
    26 #define BM_col_to_byte(x)  ((x)/8)
    27 #define BM_col_to_bit(x)   ((x)%8)
     26#define BM_col_to_byte(x)  ((x) >> 3)  /* x / 8 */
     27#define BM_col_to_bit(x)   ((x) & 7)   /* x % 8 */
    2828
    2929static int depth;
Note: See TracChangeset for help on using the changeset viewer.