Core: Do not use STL container size method to check if container is empty

This commit is contained in:
Spp- committed 2011-07-01 14:58:44 +02:00
1 parent ce75ced741
commit bb921ae78c
17 files changed
+34 -30

No files matched your search

+4 -4
View File
@@ -360,7 +360,7 @@ namespace VMAP
bool GroupModel::IntersectRay(const G3D::Ray &ray, float &distance, bool stopAtFirstHit) const
{
if (!triangles.size())
if (triangles.empty())
return false;
GModelRayCallback callback(triangles, vertices);
meshTree.intersectRay(ray, callback, distance, stopAtFirstHit);
@@ -369,7 +369,7 @@ namespace VMAP
bool GroupModel::IsInsideObject(const Vector3 &pos, const Vector3 &down, float &z_dist) const
{
if (!triangles.size() || !iBound.contains(pos))
if (triangles.empty() || !iBound.contains(pos))
return false;
GModelRayCallback callback(triangles, vertices);
Vector3 rPos = pos - 0.1f * down;
@@ -468,7 +468,7 @@ namespace VMAP
bool WorldModel::IntersectPoint(const G3D::Vector3 &p, const G3D::Vector3 &down, float &dist, AreaInfo &info) const
{
if (!groupModels.size())
if (groupModels.empty())
return false;
WModelAreaCallback callback(groupModels, down);
groupTree.intersectPoint(p, callback);
@@ -486,7 +486,7 @@ namespace VMAP
bool WorldModel::GetLocationInfo(const G3D::Vector3 &p, const G3D::Vector3 &down, float &dist, LocationInfo &info) const
{
if (!groupModels.size())
if (groupModels.empty())
return false;
WModelAreaCallback callback(groupModels, down);
groupTree.intersectPoint(p, callback);