Skip to content

Commit

Permalink
renamed conflicting macro/function in bitfield
Browse files Browse the repository at this point in the history
  • Loading branch information
rfbird committed Feb 15, 2018
1 parent f7f2384 commit 76cbe6d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/util/bitfield.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class BitField
/*!---------------------------------------------------------------------
* Set individual bit.
----------------------------------------------------------------------*/
uint32_t setbit(size_t bit) {
uint32_t setibit(size_t bit) {
uint32_t tmp = 1<<bit;
return bits_ |= tmp;
} // setbit
} // setibit

/*!---------------------------------------------------------------------
* Clear bits in mask.
Expand All @@ -37,23 +37,23 @@ class BitField
uint32_t clearbit(size_t bit) {
uint32_t tmp = 1<<bit;
return bits_ &= ~tmp;
} // setbit
} // clearbit

/*!---------------------------------------------------------------------
* Check whether bit at index is set.
----------------------------------------------------------------------*/
bool bitset(size_t bit) const {
uint32_t tmp = 1<<bit;
return tmp & bits_;
} // setbit
} // bitset

/*!---------------------------------------------------------------------
* Check whether bits in mask are set.
----------------------------------------------------------------------*/
bool bitsset(uint32_t mask) const {
uint32_t tmp = 1<<mask;
return tmp & bits_;
} // setbit
} // bitset

/*!---------------------------------------------------------------------
* Check whether bit at index is clear.
Expand Down

0 comments on commit 76cbe6d

Please sign in to comment.