diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-07 16:28:19 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-07 16:28:19 +0400 |
commit | aedf450746f1373beb82b9844e66b7ea1c828814 (patch) | |
tree | 32a55eaaaaa1a4ff00e4a57100166eb3f6558596 /source/gameengine/Rasterizer/RAS_MaterialBucket.cpp | |
parent | 35f0ded3776bc08fb52e8068a8a91374192d5b2f (diff) |
code cleanup: use checks for empty rather then size in the BGE
Diffstat (limited to 'source/gameengine/Rasterizer/RAS_MaterialBucket.cpp')
-rw-r--r-- | source/gameengine/Rasterizer/RAS_MaterialBucket.cpp | 6 |
1 files changed, 3 insertions, 3 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(); } |