Sets the item at the given index. The index of the item. The value to set.
| 221 | /// <param name="index">The index of the item.</param> |
| 222 | /// <param name="value">The value to set.</param> |
| 223 | void Set(const int32 index, const bool value) |
| 224 | { |
| 225 | ASSERT(index >= 0 && index < _count); |
| 226 | const ItemType offset = index / 64; |
| 227 | const ItemType bitMask = 1ull << (index & 63ull); |
| 228 | ItemType& item = ((ItemType*)_allocation.Get())[offset]; |
| 229 | if (value) |
| 230 | item |= bitMask; // Set the bit |
| 231 | else |
| 232 | item &= ~bitMask; // Unset the bit |
| 233 | } |
| 234 | |
| 235 | public: |
| 236 | /// <summary> |