mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-18 13:21:40 +00:00
Changed: Replaced tests with .size() by .empty() because faster
This commit is contained in:
parent
0e95ce2a25
commit
f7d9b32051
4 changed files with 4 additions and 4 deletions
|
@ -362,7 +362,7 @@ int main()
|
|||
}
|
||||
++itAcc;
|
||||
}
|
||||
if ((vCluster.size() == 0) && (DispCS[0].pIG == pCurIG))
|
||||
if (vCluster.empty() && (DispCS[0].pIG == pCurIG))
|
||||
{
|
||||
vCluster.push_back (pClipTrav->RootCluster);
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ CConfiguration::~CConfiguration()
|
|||
void CConfiguration::init()
|
||||
{
|
||||
// verify data
|
||||
nlassert(!m_ConfigCallbacks.size());
|
||||
nlassert(m_ConfigCallbacks.empty());
|
||||
|
||||
// load config
|
||||
m_ConfigFile.load(NLQT_CONFIG_FILE);
|
||||
|
|
|
@ -271,7 +271,7 @@ void CFlareModel::traverseRender()
|
|||
float depthRangeNear, depthRangeFar;
|
||||
drv->getDepthRange(depthRangeNear, depthRangeFar);
|
||||
z = (depthRangeFar - depthRangeNear) * z + depthRangeNear;
|
||||
if (!v.size() || z > v[0]) // test against z-buffer
|
||||
if (v.empty() || z > v[0]) // test against z-buffer
|
||||
{
|
||||
visibilityRatio = 0.f;
|
||||
}
|
||||
|
|
|
@ -354,7 +354,7 @@ void CLodCharacterShape::buildMesh(const std::string &name, const CLodCharacte
|
|||
const vector<CVector> &normals= lodBuild.Normals;
|
||||
|
||||
nlassert(numVertices>0);
|
||||
nlassert(triangleIndices.size()>0);
|
||||
nlassert(!triangleIndices.empty());
|
||||
nlassert((triangleIndices.size()%3)==0);
|
||||
nlassert(skinWeights.size() == numVertices);
|
||||
nlassert(uvs.size() == numVertices);
|
||||
|
|
Loading…
Reference in a new issue