Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-10-07 16:28:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-07 16:28:19 +0400
commitaedf450746f1373beb82b9844e66b7ea1c828814 (patch)
tree32a55eaaaaa1a4ff00e4a57100166eb3f6558596
parent35f0ded3776bc08fb52e8068a8a91374192d5b2f (diff)
code cleanup: use checks for empty rather then size in the BGE
-rw-r--r--source/gameengine/Rasterizer/RAS_MaterialBucket.cpp6
-rw-r--r--source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
index 183da9d252e..c890f0c3dc5 100644
--- a/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
+++ b/source/gameengine/Rasterizer/RAS_MaterialBucket.cpp
@@ -147,7 +147,7 @@ void RAS_MeshSlot::begin(RAS_MeshSlot::iterator& it)
int startvertex, endvertex;
int startindex, endindex;
- it.array = (m_displayArrays.size() > 0)? m_displayArrays[m_startarray]: NULL;
+ it.array = m_displayArrays.empty() ? NULL : m_displayArrays[m_startarray];
if (it.array == NULL || it.array->m_index.size() == 0 || it.array->m_vertex.size() == 0) {
it.array = NULL;
@@ -368,7 +368,7 @@ bool RAS_MeshSlot::Join(RAS_MeshSlot *target, MT_Scalar distance)
size_t i;
// verify if we can join
- if (m_joinSlot || m_joinedSlots.size() || target->m_joinSlot)
+ if (m_joinSlot || (m_joinedSlots.empty() == false) || target->m_joinSlot)
return false;
if (!Equals(target))
@@ -461,7 +461,7 @@ bool RAS_MeshSlot::Split(bool force)
abort();
}
- if (target->m_displayArrays.size()) {
+ if (target->m_displayArrays.empty() == false) {
target->m_endvertex = target->m_displayArrays.back()->m_vertex.size();
target->m_endindex = target->m_displayArrays.back()->m_index.size();
}
diff --git a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
index 67423123a7a..a0da1c79baa 100644
--- a/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
+++ b/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp
@@ -359,7 +359,7 @@ void RAS_OpenGLRasterizer::ClearCachingInfo(void)
void RAS_OpenGLRasterizer::FlushDebugShapes()
{
- if (!m_debugShapes.size())
+ if (m_debugShapes.empty())
return;
// DrawDebugLines