diff options
author | Ryan Pavlik <rpavlik@iastate.edu> | 2011-11-02 17:33:39 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2012-01-04 06:54:46 (GMT) |
commit | d70bdbe6759ff47b76802aaa02ff8a0cdac20512 (patch) | |
tree | 534b8ed13b166ed6e8cdb31e4ee0830da2986975 /src | |
parent | 5ae8bdf49db36b2691ce545e3285f9ee64f92148 (diff) | |
download | fluxbox_paul-d70bdbe6759ff47b76802aaa02ff8a0cdac20512.zip fluxbox_paul-d70bdbe6759ff47b76802aaa02ff8a0cdac20512.tar.bz2 |
Check .empty() instead of .size() == 0
Found with cppcheck.
Diffstat (limited to 'src')
-rw-r--r-- | src/FbTk/Menu.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc index 671d32a..a66b6c0 100644 --- a/src/FbTk/Menu.cc +++ b/src/FbTk/Menu.cc | |||
@@ -378,7 +378,7 @@ void Menu::enterSubmenu() { | |||
378 | if (submenu == 0) | 378 | if (submenu == 0) |
379 | return; | 379 | return; |
380 | 380 | ||
381 | if (submenu->menuitems.size() == 0) | 381 | if (submenu->menuitems.empty()) |
382 | return; | 382 | return; |
383 | 383 | ||
384 | drawSubmenu(m_active_index); | 384 | drawSubmenu(m_active_index); |
@@ -773,7 +773,7 @@ void Menu::drawSubmenu(unsigned int index) { | |||
773 | int Menu::drawItem(FbDrawable &drawable, unsigned int index, | 773 | int Menu::drawItem(FbDrawable &drawable, unsigned int index, |
774 | bool highlight, bool exclusive_drawable) { | 774 | bool highlight, bool exclusive_drawable) { |
775 | 775 | ||
776 | if (index >= menuitems.size() || menuitems.size() == 0 || | 776 | if (index >= menuitems.size() || menuitems.empty() || |
777 | m_rows_per_column == 0) | 777 | m_rows_per_column == 0) |
778 | return 0; | 778 | return 0; |
779 | 779 | ||