wesnoth-cvs-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Wesnoth-cvs-commits] wesnoth/src/widgets menu.cpp


From: Guillaume Melquiond
Subject: [Wesnoth-cvs-commits] wesnoth/src/widgets menu.cpp
Date: Fri, 13 May 2005 03:06:58 -0400

CVSROOT:        /cvsroot/wesnoth
Module name:    wesnoth
Branch:         
Changes by:     Guillaume Melquiond <address@hidden>    05/05/13 07:06:57

Modified files:
        src/widgets    : menu.cpp 

Log message:
        Fix selected_ comparisons.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/widgets/menu.cpp.diff?tr1=1.89&tr2=1.90&r1=text&r2=text

Patches:
Index: wesnoth/src/widgets/menu.cpp
diff -u wesnoth/src/widgets/menu.cpp:1.89 wesnoth/src/widgets/menu.cpp:1.90
--- wesnoth/src/widgets/menu.cpp:1.89   Tue May 10 22:15:57 2005
+++ wesnoth/src/widgets/menu.cpp        Fri May 13 07:06:57 2005
@@ -292,7 +292,7 @@
 
 int menu::selection() const
 {
-       if(selected_ < 0 || selected_ >= int(items_.size())) {
+       if (selected_ >= items_.size()) {
                return -1;
        }
 
@@ -365,7 +365,7 @@
        max_items_ = -1; // Force recalculation of the max items.
        item_height_ = -1; // Force recalculation of the item height.
 
-       if(keep_viewport == false || selected_ >= int(items.size())) {
+       if (!keep_viewport || selected_ >= items.size()) {
                selected_ = 0;
        }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]