[World] Performance fix (for MinGW).
This commit is contained in:
parent
758813a35d
commit
95a804d9fc
@ -53,17 +53,21 @@ class World {
|
||||
void setData(int x, int y, int z, u16 data) const;
|
||||
|
||||
bool addChunkToUpdate(Chunk *chunk) {
|
||||
auto [it, res] = m_chunksToUpdate.emplace(chunk);
|
||||
if (res)
|
||||
if (m_chunksToUpdate.count(chunk) < 1) {
|
||||
m_chunksToUpdate.emplace(chunk);
|
||||
m_chunkUpdateQueue.emplace(chunk);
|
||||
return res;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool addChunkToProcess(Chunk *chunk) {
|
||||
auto [it, res] = m_chunksToProcess.emplace(chunk);
|
||||
if (res)
|
||||
if (m_chunksToProcess.count(chunk) < 1) {
|
||||
m_chunksToProcess.emplace(chunk);
|
||||
m_chunkProcessQueue.emplace(chunk);
|
||||
return res;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
virtual void onBlockPlaced(int, int, int, const Block &) {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user