-Data chunker was leaking, (my bad) fixed

-Added != operator to scene container for std:c++17 conformance.
This commit is contained in:
marauder2k7 2023-10-15 19:01:51 +01:00 committed by Brian Roberts
parent 4b2e3aac43
commit 09b1e9783a
2 changed files with 19 additions and 3 deletions

View file

@ -91,7 +91,14 @@ void DataChunker::freeBlocks(bool keepOne)
mCurBlock = temp;
}
if (mCurBlock)
if (!keepOne)
{
if (mCurBlock)
dFree(mCurBlock);
mCurBlock = NULL;
}
else if (mCurBlock)
{
mCurBlock->curIndex = 0;
mCurBlock->next = NULL;

View file

@ -80,8 +80,17 @@ struct SceneBinRange
inline bool operator==(const SceneBinRange& other) const
{
return memcmp(minCoord, other.minCoord, sizeof(minCoord)) == 0 &&
memcmp(maxCoord, other.maxCoord, sizeof(maxCoord)) == 0;
return dMemcmp(minCoord, other.minCoord, sizeof(minCoord)) == 0 &&
dMemcmp(maxCoord, other.maxCoord, sizeof(maxCoord)) == 0;
}
inline bool operator!=(const SceneBinRange& other) const
{
if (dMemcmp(minCoord, other.minCoord, sizeof(minCoord)) == 0 &&
dMemcmp(maxCoord, other.maxCoord, sizeof(maxCoord)) == 0)
return false;
else
return true;
}
};