mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Mem fix
-Data chunker was leaking, (my bad) fixed -Added != operator to scene container for std:c++17 conformance.
This commit is contained in:
parent
4b2e3aac43
commit
09b1e9783a
2 changed files with 19 additions and 3 deletions
|
|
@ -91,7 +91,14 @@ void DataChunker::freeBlocks(bool keepOne)
|
||||||
mCurBlock = temp;
|
mCurBlock = temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCurBlock)
|
if (!keepOne)
|
||||||
|
{
|
||||||
|
if (mCurBlock)
|
||||||
|
dFree(mCurBlock);
|
||||||
|
|
||||||
|
mCurBlock = NULL;
|
||||||
|
}
|
||||||
|
else if (mCurBlock)
|
||||||
{
|
{
|
||||||
mCurBlock->curIndex = 0;
|
mCurBlock->curIndex = 0;
|
||||||
mCurBlock->next = NULL;
|
mCurBlock->next = NULL;
|
||||||
|
|
|
||||||
|
|
@ -80,8 +80,17 @@ struct SceneBinRange
|
||||||
|
|
||||||
inline bool operator==(const SceneBinRange& other) const
|
inline bool operator==(const SceneBinRange& other) const
|
||||||
{
|
{
|
||||||
return memcmp(minCoord, other.minCoord, sizeof(minCoord)) == 0 &&
|
return dMemcmp(minCoord, other.minCoord, sizeof(minCoord)) == 0 &&
|
||||||
memcmp(maxCoord, other.maxCoord, sizeof(maxCoord)) == 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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue