mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
Use the wonderful empty() member instead of abusing size()
This commit is contained in:
parent
364dd3634d
commit
b721288d6b
1 changed files with 5 additions and 5 deletions
|
|
@ -622,7 +622,7 @@ bool NavMesh::build(bool background, bool saveIntermediates)
|
||||||
|
|
||||||
if(!background)
|
if(!background)
|
||||||
{
|
{
|
||||||
while(mDirtyTiles.size())
|
while(!mDirtyTiles.empty())
|
||||||
buildNextTile();
|
buildNextTile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -637,7 +637,7 @@ DefineEngineMethod(NavMesh, build, bool, (bool background, bool save), (true, fa
|
||||||
|
|
||||||
void NavMesh::cancelBuild()
|
void NavMesh::cancelBuild()
|
||||||
{
|
{
|
||||||
while(mDirtyTiles.size()) mDirtyTiles.pop();
|
while(!mDirtyTiles.empty()) mDirtyTiles.pop();
|
||||||
ctx->stopTimer(RC_TIMER_TOTAL);
|
ctx->stopTimer(RC_TIMER_TOTAL);
|
||||||
mBuilding = false;
|
mBuilding = false;
|
||||||
}
|
}
|
||||||
|
|
@ -707,7 +707,7 @@ void NavMesh::updateTiles(bool dirty)
|
||||||
|
|
||||||
mTiles.clear();
|
mTiles.clear();
|
||||||
mTileData.clear();
|
mTileData.clear();
|
||||||
while(mDirtyTiles.size()) mDirtyTiles.pop();
|
while(!mDirtyTiles.empty()) mDirtyTiles.pop();
|
||||||
|
|
||||||
const Box3F &box = DTStoRC(getWorldBox());
|
const Box3F &box = DTStoRC(getWorldBox());
|
||||||
if(box.isEmpty())
|
if(box.isEmpty())
|
||||||
|
|
@ -756,7 +756,7 @@ void NavMesh::processTick(const Move *move)
|
||||||
|
|
||||||
void NavMesh::buildNextTile()
|
void NavMesh::buildNextTile()
|
||||||
{
|
{
|
||||||
if(mDirtyTiles.size())
|
if(!mDirtyTiles.empty())
|
||||||
{
|
{
|
||||||
// Pop a single dirty tile and process it.
|
// Pop a single dirty tile and process it.
|
||||||
U32 i = mDirtyTiles.front();
|
U32 i = mDirtyTiles.front();
|
||||||
|
|
@ -794,7 +794,7 @@ void NavMesh::buildNextTile()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Did we just build the last tile?
|
// Did we just build the last tile?
|
||||||
if(!mDirtyTiles.size())
|
if(mDirtyTiles.empty())
|
||||||
{
|
{
|
||||||
ctx->stopTimer(RC_TIMER_TOTAL);
|
ctx->stopTimer(RC_TIMER_TOTAL);
|
||||||
if(getEventManager())
|
if(getEventManager())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue