mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 16:10:49 +01:00
Tools/mmaps: Change the PCQ queue to uint32 again
6f272ea5b7 re-added support for non-pointer types
This commit is contained in:
@@ -171,19 +171,14 @@ namespace MMAP
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
uint32* mapId = nullptr;
|
||||
uint32 mapId;
|
||||
|
||||
_queue.WaitAndPop(mapId);
|
||||
|
||||
if (_cancelationToken)
|
||||
return;
|
||||
|
||||
if (!mapId) // shouldn't happen?
|
||||
continue;
|
||||
|
||||
buildMap(*mapId);
|
||||
|
||||
delete mapId;
|
||||
buildMap(mapId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,7 +200,7 @@ namespace MMAP
|
||||
if (!shouldSkipMap(mapId))
|
||||
{
|
||||
if (threads > 0)
|
||||
_queue.Push(new uint32(mapId));
|
||||
_queue.Push(mapId);
|
||||
else
|
||||
buildMap(mapId);
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace MMAP
|
||||
rcContext* m_rcContext;
|
||||
|
||||
std::vector<std::thread> _workerThreads;
|
||||
ProducerConsumerQueue<uint32*> _queue;
|
||||
ProducerConsumerQueue<uint32> _queue;
|
||||
std::atomic<bool> _cancelationToken;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user