From 76374f0198e2b14c5dcf8b354d56185b52604470 Mon Sep 17 00:00:00 2001 From: auria Date: Sun, 27 Mar 2011 01:30:38 +0000 Subject: [PATCH] Shut up annoying warning git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8082 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/guiengine/widgets/dynamic_ribbon_widget.cpp | 2 +- src/states_screens/options_screen_video.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/guiengine/widgets/dynamic_ribbon_widget.cpp b/src/guiengine/widgets/dynamic_ribbon_widget.cpp index 1b06a7d9a..aa7436f3d 100644 --- a/src/guiengine/widgets/dynamic_ribbon_widget.cpp +++ b/src/guiengine/widgets/dynamic_ribbon_widget.cpp @@ -987,7 +987,7 @@ bool DynamicRibbonWidget::setSelection(int item_id, const int playerID, const bo if (row == -1) { - std::cerr << "DynamicRibbonWidget::setSelection cannot find item " << item_id << " (" << name.c_str() << ")\n"; + //std::cerr << "DynamicRibbonWidget::setSelection cannot find item " << item_id << " (" << name.c_str() << ")\n"; return false; } diff --git a/src/states_screens/options_screen_video.cpp b/src/states_screens/options_screen_video.cpp index 45002feda..5698d6550 100644 --- a/src/states_screens/options_screen_video.cpp +++ b/src/states_screens/options_screen_video.cpp @@ -236,7 +236,11 @@ void OptionsScreenVideo::init() if (items[n].m_code_name == searching_for) { // that's the current one - res->setSelection(n, PLAYER_ID_GAME_MASTER, false); + if (!res->setSelection(n, PLAYER_ID_GAME_MASTER, false)) + { + std::cerr << "DynamicRibbonWidget::setSelection cannot find item " << n << " (" + << items[n].m_code_name.c_str() << ")\n"; + } break; } } // end for