diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 671d32ae..a66b6c0c 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc @@ -378,7 +378,7 @@ void Menu::enterSubmenu() { if (submenu == 0) return; - if (submenu->menuitems.size() == 0) + if (submenu->menuitems.empty()) return; drawSubmenu(m_active_index); @@ -773,7 +773,7 @@ void Menu::drawSubmenu(unsigned int index) { int Menu::drawItem(FbDrawable &drawable, unsigned int index, bool highlight, bool exclusive_drawable) { - if (index >= menuitems.size() || menuitems.size() == 0 || + if (index >= menuitems.size() || menuitems.empty() || m_rows_per_column == 0) return 0; diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc index 1dd813a7..9ed31860 100644 --- a/util/fbrun/FbRun.cc +++ b/util/fbrun/FbRun.cc @@ -346,7 +346,7 @@ void FbRun::lockPosition(bool size_too) { } void FbRun::prevHistoryItem() { - if (m_history.size() == 0 || m_current_history_item == 0) { + if (m_history.empty() || m_current_history_item == 0) { XBell(m_display, 0); } else { m_current_history_item--; @@ -370,7 +370,7 @@ void FbRun::nextHistoryItem() { } void FbRun::firstHistoryItem() { - if (m_history.size() == 0 || m_current_history_item == 0) { + if (m_history.empty() || m_current_history_item == 0) { XBell(m_display, 0); } else { m_current_history_item = 0; @@ -380,7 +380,7 @@ void FbRun::firstHistoryItem() { void FbRun::lastHistoryItem() { // actually one past the end - if (m_history.size() == 0) { + if (m_history.empty()) { XBell(m_display, 0); } else { m_current_history_item = m_history.size();