GCC build fix

This commit is contained in:
Shauren
2022-12-17 12:54:26 +01:00
parent bf4880973d
commit 25c28c0c7d
3 changed files with 7 additions and 7 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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: