1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Use std::string::empty() instead of size() where applicable

This commit is contained in:
Anton 2014-12-12 19:55:40 +05:00 committed by ShadowNinja
parent 83830e8682
commit 10e0cf8b2c
14 changed files with 27 additions and 27 deletions

View file

@ -56,7 +56,7 @@ public:
assert(*i != menu);
}
if(m_stack.size() != 0)
if(!m_stack.empty())
m_stack.back()->setVisible(false);
m_stack.push_back(menu);
}
@ -84,14 +84,14 @@ public:
assert(*i == menu);
m_stack.erase(i);*/
if(m_stack.size() != 0)
if(!m_stack.empty())
m_stack.back()->setVisible(true);
}
// Returns true to prevent further processing
virtual bool preprocessEvent(const SEvent& event)
{
if(m_stack.size() != 0)
if(!m_stack.empty())
return m_stack.back()->preprocessEvent(event);
else
return false;