Author: mordante
Date: Sun Jul  6 10:12:40 2008
New Revision: 27774

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27774&view=rev
Log:
Fixed some compiler warnings about unused variables and missing braces.
The latter is fatal on gcc-4.3.

Modified:
    trunk/src/controller_base.cpp

Modified: trunk/src/controller_base.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/controller_base.cpp?rev=27774&r1=27773&r2=27774&view=diff
==============================================================================
--- trunk/src/controller_base.cpp (original)
+++ trunk/src/controller_base.cpp Sun Jul  6 10:12:40 2008
@@ -17,7 +17,7 @@
 #include "dialogs.hpp"
 #include "mouse_handler_base.hpp"
 
-controller_base::controller_base(int ticks, const config& game_config, CVideo& 
video)
+controller_base::controller_base(int ticks, const config& game_config, CVideo& 
/*video*/)
 : game_config_(game_config), ticks_(ticks), browse_(false), scrolling_(false)
 {      
 }
@@ -30,7 +30,9 @@
        return ticks_;
 }
 
-bool controller_base::can_execute_command(hotkey::HOTKEY_COMMAND command, int 
index) const {
+bool controller_base::can_execute_command(
+               hotkey::HOTKEY_COMMAND /*command*/, int /*index*/) const 
+{
        return false;
 }
 
@@ -76,19 +78,21 @@
        }
 }
 
-bool controller_base::have_keyboard_focus() {
+bool controller_base::have_keyboard_focus() 
+{
        return true;
 }
 
-void controller_base::process_keydown_event(const SDL_Event& event) {
+void controller_base::process_keydown_event(const SDL_Event& /*event*/) 
+{
        //no action by default
 }
 
-void controller_base::process_keyup_event(const SDL_Event& event) {
+void controller_base::process_keyup_event(const SDL_Event& /*event*/) {
        //no action by default
 }
 
-void controller_base::post_mouse_press(const SDL_Event& event) {
+void controller_base::post_mouse_press(const SDL_Event& /*event*/) {
        //no action by default
 }
 
@@ -97,19 +101,19 @@
        bool scrolling = false;
        const int scroll_threshold = (preferences::mouse_scroll_enabled()) ? 5 
: 0;
 
-       if (key[SDLK_UP] && have_keyboard_focus() || mousey < scroll_threshold) 
{
+       if ((key[SDLK_UP] && have_keyboard_focus()) || mousey < 
scroll_threshold) {
                get_display().scroll(0,-preferences::scroll_speed());
                scrolling = true;
        }
-       if (key[SDLK_DOWN] && have_keyboard_focus() || mousey > 
get_display().h() - scroll_threshold) {
+       if ((key[SDLK_DOWN] && have_keyboard_focus()) || mousey > 
get_display().h() - scroll_threshold) {
                get_display().scroll(0,preferences::scroll_speed());
                scrolling = true;
        }
-       if (key[SDLK_LEFT] && have_keyboard_focus() || mousex < 
scroll_threshold) {
+       if ((key[SDLK_LEFT] && have_keyboard_focus()) || mousex < 
scroll_threshold) {
                get_display().scroll(-preferences::scroll_speed(),0);
                scrolling = true;
        }
-       if (key[SDLK_RIGHT] && have_keyboard_focus() || mousex > 
get_display().w() - scroll_threshold) {
+       if ((key[SDLK_RIGHT] && have_keyboard_focus()) || mousex > 
get_display().w() - scroll_threshold) {
                get_display().scroll(preferences::scroll_speed(),0);
                scrolling = true;
        }


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to