aboutsummaryrefslogtreecommitdiff
path: root/util/fbrun
diff options
context:
space:
mode:
authorRyan Pavlik <rpavlik@iastate.edu>2011-11-02 17:33:39 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2012-01-04 06:54:46 (GMT)
commitd70bdbe6759ff47b76802aaa02ff8a0cdac20512 (patch)
tree534b8ed13b166ed6e8cdb31e4ee0830da2986975 /util/fbrun
parent5ae8bdf49db36b2691ce545e3285f9ee64f92148 (diff)
downloadfluxbox_paul-d70bdbe6759ff47b76802aaa02ff8a0cdac20512.zip
fluxbox_paul-d70bdbe6759ff47b76802aaa02ff8a0cdac20512.tar.bz2
Check .empty() instead of .size() == 0
Found with cppcheck.
Diffstat (limited to 'util/fbrun')
-rw-r--r--util/fbrun/FbRun.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/fbrun/FbRun.cc b/util/fbrun/FbRun.cc
index 1dd813a..9ed3186 100644
--- a/util/fbrun/FbRun.cc
+++ b/util/fbrun/FbRun.cc
@@ -346,7 +346,7 @@ void FbRun::lockPosition(bool size_too) {
346} 346}
347 347
348void FbRun::prevHistoryItem() { 348void FbRun::prevHistoryItem() {
349 if (m_history.size() == 0 || m_current_history_item == 0) { 349 if (m_history.empty() || m_current_history_item == 0) {
350 XBell(m_display, 0); 350 XBell(m_display, 0);
351 } else { 351 } else {
352 m_current_history_item--; 352 m_current_history_item--;
@@ -370,7 +370,7 @@ void FbRun::nextHistoryItem() {
370} 370}
371 371
372void FbRun::firstHistoryItem() { 372void FbRun::firstHistoryItem() {
373 if (m_history.size() == 0 || m_current_history_item == 0) { 373 if (m_history.empty() || m_current_history_item == 0) {
374 XBell(m_display, 0); 374 XBell(m_display, 0);
375 } else { 375 } else {
376 m_current_history_item = 0; 376 m_current_history_item = 0;
@@ -380,7 +380,7 @@ void FbRun::firstHistoryItem() {
380 380
381void FbRun::lastHistoryItem() { 381void FbRun::lastHistoryItem() {
382 // actually one past the end 382 // actually one past the end
383 if (m_history.size() == 0) { 383 if (m_history.empty()) {
384 XBell(m_display, 0); 384 XBell(m_display, 0);
385 } else { 385 } else {
386 m_current_history_item = m_history.size(); 386 m_current_history_item = m_history.size();