forked from bartvdbraak/blender
code cleanup: use checks for empty rather then size in the BGE
This commit is contained in:
parent
35f0ded377
commit
aedf450746
@ -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();
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ void RAS_OpenGLRasterizer::ClearCachingInfo(void)
|
||||
|
||||
void RAS_OpenGLRasterizer::FlushDebugShapes()
|
||||
{
|
||||
if (!m_debugShapes.size())
|
||||
if (m_debugShapes.empty())
|
||||
return;
|
||||
|
||||
// DrawDebugLines
|
||||
|
Loading…
Reference in New Issue
Block a user