For fast bit operations, we're not going to setup operator[]; instead we're going to have a GetBit and a SetBit commamd. For this raw version we're also going to assume that the index is within range w/o any special checks.
| 148 | // we're also going to assume that the index is within range w/o any special |
| 149 | // checks. |
| 150 | bool GetBit(const int index) const{ |
| 151 | const int field_id = GetField(index); |
| 152 | const int pos_id = GetFieldPos(index); |
| 153 | return (bit_fields[field_id] & (1 << pos_id)) != 0; |
| 154 | } |
| 155 | |
| 156 | void SetBit(const int index, const bool value) { |
| 157 | const int field_id = GetField(index); |