Changeset 1889 for trunk


Ignore:
Timestamp:
Jan 27, 2012, 7:48:11 AM (7 years ago)
Author:
cameron
Message:

Bug fix: use scanword_t throughout instead of long

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/bitblock128.hpp

    r1855 r1889  
    8686        u.bitblock = v;
    8787  uint32_t so_far = 0;
    88   for (int i = 0; i < sizeof(bitblock128_t)/sizeof(long); i++) {
     88  for (int i = 0; i < sizeof(bitblock128_t)/sizeof(scanword_t); i++) {
    8989    if (u.elems[i] != 0) return so_far + scan_forward_zeroes(u.elems[i]);
    90     so_far += 8 * sizeof(long);
     90    so_far += 8 * sizeof(scanword_t);
    9191  }
    9292  return so_far;
     
    9797        u.bitblock = v;
    9898  uint32_t so_far = 0;
    99   for (int i = sizeof(bitblock128_t)/sizeof(long) - 1; i >= 0; i--) {
     99  for (int i = sizeof(bitblock128_t)/sizeof(scanword_t) - 1; i >= 0; i--) {
    100100    if (u.elems[i] != 0) return so_far + scan_backward_zeroes(u.elems[i]);
    101     so_far += 8 * sizeof(long);
     101    so_far += 8 * sizeof(scanword_t);
    102102  }
    103103  return so_far;
Note: See TracChangeset for help on using the changeset viewer.