From ed917f8661b0f0bea34001f2511184cee6b4f4bc Mon Sep 17 00:00:00 2001 From: david Date: Thu, 18 Jul 2002 22:32:12 +0000 Subject: [PATCH] Patch from Cameron Moore: * Fixed (un)signed comparisons * Rearranged member initializers --- src/Input/input.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Input/input.cxx b/src/Input/input.cxx index bb350b432..25d53645d 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -403,12 +403,12 @@ FGInput::doMouseMotion (int x, int y) // so we can play with it. if (x != m.x) { int delta = x - m.x; - for (int i = 0; i < mode.x_bindings[modifiers].size(); i++) + for (unsigned int i = 0; i < mode.x_bindings[modifiers].size(); i++) mode.x_bindings[modifiers][i]->fire(double(delta), double(xsize)); } if (y != m.y) { int delta = y - m.y; - for (int i = 0; i < mode.y_bindings[modifiers].size(); i++) + for (unsigned int i = 0; i < mode.y_bindings[modifiers].size(); i++) mode.y_bindings[modifiers][i]->fire(double(delta), double(ysize)); } @@ -487,7 +487,7 @@ FGInput::_init_joystick () std::cout << "Looking for bindings for joystick \"" << name << '"' << std::endl; vector nodes = js_nodes->getChildren("js-named"); - for (int i = 0; i < nodes.size(); i++) { + for (unsigned int i = 0; i < nodes.size(); i++) { SGPropertyNode_ptr node = nodes[i]; std::cout << " Trying \"" << node->getStringValue("name") << '"' << std::endl; if (!strcmp(node->getStringValue("name"), name)) { @@ -968,10 +968,10 @@ FGInput::mouse_mode::~mouse_mode () //////////////////////////////////////////////////////////////////////// FGInput::mouse::mouse () - : nModes(1), - current_mode(0), - x(-1), + : x(-1), y(-1), + nModes(1), + current_mode(0), modes(0) { }