Revert BitArray changes
This commit is contained in:
@@ -214,8 +214,8 @@ public:
|
|||||||
{
|
{
|
||||||
ASSERT(index >= 0 && index < _count);
|
ASSERT(index >= 0 && index < _count);
|
||||||
const ItemType offset = index / sizeof(ItemType);
|
const ItemType offset = index / sizeof(ItemType);
|
||||||
const ItemType bitMask = static_cast<ItemType>((int32)(1 << (index & (static_cast<int32>(sizeof(ItemType)) - 1))));
|
const ItemType bitMask = (ItemType)(int32)(1 << (index & ((int32)sizeof(ItemType) - 1)));
|
||||||
const ItemType item = static_cast<const ItemType*>(_allocation.Get())[offset];
|
const ItemType item = ((ItemType*)_allocation.Get())[offset];
|
||||||
return (item & bitMask) != 0;
|
return (item & bitMask) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,12 +228,12 @@ public:
|
|||||||
{
|
{
|
||||||
ASSERT(index >= 0 && index < _count);
|
ASSERT(index >= 0 && index < _count);
|
||||||
const ItemType offset = index / sizeof(ItemType);
|
const ItemType offset = index / sizeof(ItemType);
|
||||||
const ItemType bitMask = static_cast<ItemType>((int32)(1 << (index & (static_cast<int32>(sizeof(ItemType)) - 1))));
|
const ItemType bitMask = (ItemType)(int32)(1 << (index & ((int32)sizeof(ItemType) - 1)));
|
||||||
ItemType& item = reinterpret_cast<ItemType&>(_allocation.Get())[offset];
|
ItemType& item = ((ItemType*)_allocation.Get())[offset];
|
||||||
if (value)
|
if (value)
|
||||||
item |= bitMask;
|
item |= bitMask;
|
||||||
else
|
else
|
||||||
item &= ~bitMask;
|
item &= ~bitMask; // Clear the bit
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
Reference in New Issue
Block a user