mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-24 08:06:13 +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;
|
++itAcc;
|
||||||
}
|
}
|
||||||
if ((vCluster.size() == 0) && (DispCS[0].pIG == pCurIG))
|
if (vCluster.empty() && (DispCS[0].pIG == pCurIG))
|
||||||
{
|
{
|
||||||
vCluster.push_back (pClipTrav->RootCluster);
|
vCluster.push_back (pClipTrav->RootCluster);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,7 +47,7 @@ CConfiguration::~CConfiguration()
|
||||||
void CConfiguration::init()
|
void CConfiguration::init()
|
||||||
{
|
{
|
||||||
// verify data
|
// verify data
|
||||||
nlassert(!m_ConfigCallbacks.size());
|
nlassert(m_ConfigCallbacks.empty());
|
||||||
|
|
||||||
// load config
|
// load config
|
||||||
m_ConfigFile.load(NLQT_CONFIG_FILE);
|
m_ConfigFile.load(NLQT_CONFIG_FILE);
|
||||||
|
|
|
@ -271,7 +271,7 @@ void CFlareModel::traverseRender()
|
||||||
float depthRangeNear, depthRangeFar;
|
float depthRangeNear, depthRangeFar;
|
||||||
drv->getDepthRange(depthRangeNear, depthRangeFar);
|
drv->getDepthRange(depthRangeNear, depthRangeFar);
|
||||||
z = (depthRangeFar - depthRangeNear) * z + depthRangeNear;
|
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;
|
visibilityRatio = 0.f;
|
||||||
}
|
}
|
||||||
|
|
|
@ -354,7 +354,7 @@ void CLodCharacterShape::buildMesh(const std::string &name, const CLodCharacte
|
||||||
const vector<CVector> &normals= lodBuild.Normals;
|
const vector<CVector> &normals= lodBuild.Normals;
|
||||||
|
|
||||||
nlassert(numVertices>0);
|
nlassert(numVertices>0);
|
||||||
nlassert(triangleIndices.size()>0);
|
nlassert(!triangleIndices.empty());
|
||||||
nlassert((triangleIndices.size()%3)==0);
|
nlassert((triangleIndices.size()%3)==0);
|
||||||
nlassert(skinWeights.size() == numVertices);
|
nlassert(skinWeights.size() == numVertices);
|
||||||
nlassert(uvs.size() == numVertices);
|
nlassert(uvs.size() == numVertices);
|
||||||
|
|
Loading…
Reference in a new issue