mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
GCC build fix
This commit is contained in:
@@ -683,7 +683,7 @@ namespace WorldPackets
|
||||
uint16 MessageID = 0;
|
||||
uint32 SequenceIndex = 0;
|
||||
Optional<float> Speed;
|
||||
Optional<SpeedRange> SpeedRange;
|
||||
Optional<MoveSetCompoundState::SpeedRange> SpeedRange;
|
||||
Optional<KnockBackInfo> KnockBack;
|
||||
Optional<int32> VehicleRecID;
|
||||
Optional<CollisionHeightInfo> CollisionHeight;
|
||||
|
||||
@@ -65,6 +65,8 @@ protected:
|
||||
std::vector<char*> _stringPool;
|
||||
char** _indexTable;
|
||||
uint32 _indexTableSize;
|
||||
|
||||
friend class UnitTestDataLoader;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
@@ -82,8 +84,6 @@ public:
|
||||
|
||||
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); }
|
||||
|
||||
friend class UnitTestDataLoader;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -48,15 +48,15 @@ class UnitTestDataLoader
|
||||
LoaderGuard Loader() { return {*this}; }
|
||||
void Dump()
|
||||
{
|
||||
delete[] _store._indexTable.AsT;
|
||||
delete[] _store._indexTable;
|
||||
for (T const& entry : _storage)
|
||||
if (entry.*ID >= _store._indexTableSize)
|
||||
_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)
|
||||
_store._indexTable.AsT[i] = nullptr;
|
||||
_store._indexTable[i] = nullptr;
|
||||
for (T& entry : _storage)
|
||||
_store._indexTable.AsT[entry.*ID] = &entry;
|
||||
_store._indexTable[entry.*ID] = reinterpret_cast<char*>(&entry);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user