mirror of
https://github.com/GearsProgress/Poke_Transporter_GB.git
synced 2026-04-26 10:17:40 -05:00
Remove useless reinterpret_cast
This commit is contained in:
parent
c755615d65
commit
ba8738fc4b
|
|
@ -107,6 +107,7 @@ namespace ptgb
|
||||||
}
|
}
|
||||||
else if(newSize > count_)
|
else if(newSize > count_)
|
||||||
{
|
{
|
||||||
|
reserve(newSize);
|
||||||
for(size_t i=0; i < (newSize - count_); ++i)
|
for(size_t i=0; i < (newSize - count_); ++i)
|
||||||
{
|
{
|
||||||
push_back(value);
|
push_back(value);
|
||||||
|
|
@ -170,12 +171,12 @@ namespace ptgb
|
||||||
|
|
||||||
ValueType& operator[](size_t index)
|
ValueType& operator[](size_t index)
|
||||||
{
|
{
|
||||||
return *reinterpret_cast<ValueType*>(buffer_ + index);
|
return *(buffer_ + index);
|
||||||
}
|
}
|
||||||
|
|
||||||
const ValueType& operator[](size_t index) const
|
const ValueType& operator[](size_t index) const
|
||||||
{
|
{
|
||||||
return *reinterpret_cast<const ValueType*>(buffer_ + index);
|
return *(buffer_ + index);
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
ValueType *buffer_;
|
ValueType *buffer_;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user