Collections casts constiness fix
This commit is contained in:
@@ -215,7 +215,7 @@ public:
|
||||
ASSERT(index >= 0 && index < _count);
|
||||
const ItemType offset = index / sizeof(ItemType);
|
||||
const ItemType bitMask = static_cast<ItemType>((int32)(1 << (index & (static_cast<int32>(sizeof(ItemType)) - 1))));
|
||||
const ItemType item = static_cast<ItemType*>(_allocation.Get())[offset];
|
||||
const ItemType item = static_cast<const ItemType*>(_allocation.Get())[offset];
|
||||
return (item & bitMask) != 0;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
ASSERT(index >= 0 && index < _count);
|
||||
const ItemType offset = index / sizeof(ItemType);
|
||||
const ItemType bitMask = static_cast<ItemType>((int32)(1 << (index & (static_cast<int32>(sizeof(ItemType)) - 1))));
|
||||
ItemType& item = reinterpret_cast<ItemType*>(_allocation.Get())[offset];
|
||||
ItemType& item = reinterpret_cast<ItemType&>(_allocation.Get())[offset];
|
||||
if (value)
|
||||
item |= bitMask;
|
||||
else
|
||||
|
||||
@@ -500,7 +500,7 @@ public:
|
||||
FindPosition(key, pos);
|
||||
if (pos.ObjectIndex == -1)
|
||||
return nullptr;
|
||||
return static_cast<ValueType*>(&_allocation.Get()[pos.ObjectIndex].Value);
|
||||
return static_cast<const ValueType*>(&_allocation.Get()[pos.ObjectIndex].Value);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user