GCC build fix
This commit is contained in:
@@ -683,7 +683,7 @@ namespace WorldPackets
|
|||||||
uint16 MessageID = 0;
|
uint16 MessageID = 0;
|
||||||
uint32 SequenceIndex = 0;
|
uint32 SequenceIndex = 0;
|
||||||
Optional<float> Speed;
|
Optional<float> Speed;
|
||||||
Optional<SpeedRange> SpeedRange;
|
Optional<MoveSetCompoundState::SpeedRange> SpeedRange;
|
||||||
Optional<KnockBackInfo> KnockBack;
|
Optional<KnockBackInfo> KnockBack;
|
||||||
Optional<int32> VehicleRecID;
|
Optional<int32> VehicleRecID;
|
||||||
Optional<CollisionHeightInfo> CollisionHeight;
|
Optional<CollisionHeightInfo> CollisionHeight;
|
||||||
|
|||||||
@@ -65,6 +65,8 @@ protected:
|
|||||||
std::vector<char*> _stringPool;
|
std::vector<char*> _stringPool;
|
||||||
char** _indexTable;
|
char** _indexTable;
|
||||||
uint32 _indexTableSize;
|
uint32 _indexTableSize;
|
||||||
|
|
||||||
|
friend class UnitTestDataLoader;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
@@ -82,8 +84,6 @@ public:
|
|||||||
|
|
||||||
iterator begin() const { return iterator(reinterpret_cast<T const* const*>(_indexTable), _indexTableSize); }
|
iterator begin() const { return iterator(reinterpret_cast<T const* const*>(_indexTable), _indexTableSize); }
|
||||||
iterator end() const { return iterator(reinterpret_cast<T const* const*>(_indexTable), _indexTableSize, _indexTableSize); }
|
iterator end() const { return iterator(reinterpret_cast<T const* const*>(_indexTable), _indexTableSize, _indexTableSize); }
|
||||||
|
|
||||||
friend class UnitTestDataLoader;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+4
-4
@@ -48,15 +48,15 @@ class UnitTestDataLoader
|
|||||||
LoaderGuard Loader() { return {*this}; }
|
LoaderGuard Loader() { return {*this}; }
|
||||||
void Dump()
|
void Dump()
|
||||||
{
|
{
|
||||||
delete[] _store._indexTable.AsT;
|
delete[] _store._indexTable;
|
||||||
for (T const& entry : _storage)
|
for (T const& entry : _storage)
|
||||||
if (entry.*ID >= _store._indexTableSize)
|
if (entry.*ID >= _store._indexTableSize)
|
||||||
_store._indexTableSize = entry.*ID + 1;
|
_store._indexTableSize = entry.*ID + 1;
|
||||||
_store._indexTable.AsT = new T*[_store._indexTableSize];
|
_store._indexTable = new char*[_store._indexTableSize];
|
||||||
for (size_t i = 0; i < _store._indexTableSize; ++i)
|
for (size_t i = 0; i < _store._indexTableSize; ++i)
|
||||||
_store._indexTable.AsT[i] = nullptr;
|
_store._indexTable[i] = nullptr;
|
||||||
for (T& entry : _storage)
|
for (T& entry : _storage)
|
||||||
_store._indexTable.AsT[entry.*ID] = &entry;
|
_store._indexTable[entry.*ID] = reinterpret_cast<char*>(&entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user