From 39ee19e0583e59e5c61b39986a4b66ace37def81 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 17 Jun 2010 15:23:44 +0000 Subject: [PATCH] Fixed warnings --- src/osgGA/FirstPersonManipulator.cpp | 7 ++++--- src/osgGA/OrbitManipulator.cpp | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/osgGA/FirstPersonManipulator.cpp b/src/osgGA/FirstPersonManipulator.cpp index 86483f03d..ecd27950d 100644 --- a/src/osgGA/FirstPersonManipulator.cpp +++ b/src/osgGA/FirstPersonManipulator.cpp @@ -239,8 +239,8 @@ bool FirstPersonManipulator::handleMouseWheel( const GUIEventAdapter& ea, GUIAct if( _flags & SET_CENTER_ON_WHEEL_FORWARD_MOVEMENT ) { - if( sm == GUIEventAdapter::SCROLL_DOWN && _wheelMovement > 0. || - sm == GUIEventAdapter::SCROLL_UP && _wheelMovement < 0. ) + if( ((sm == GUIEventAdapter::SCROLL_DOWN) && (_wheelMovement > 0.)) || + ((sm == GUIEventAdapter::SCROLL_UP) && (_wheelMovement < 0.)) ) { // stop thrown animation @@ -261,7 +261,8 @@ bool FirstPersonManipulator::handleMouseWheel( const GUIEventAdapter& ea, GUIAct } } - switch( sm ) { + switch( sm ) + { // mouse scroll up event case GUIEventAdapter::SCROLL_UP: diff --git a/src/osgGA/OrbitManipulator.cpp b/src/osgGA/OrbitManipulator.cpp index 8af5ad610..d58e6ffa6 100644 --- a/src/osgGA/OrbitManipulator.cpp +++ b/src/osgGA/OrbitManipulator.cpp @@ -223,8 +223,8 @@ bool OrbitManipulator::handleMouseWheel( const GUIEventAdapter& ea, GUIActionAda if( _flags & SET_CENTER_ON_WHEEL_FORWARD_MOVEMENT ) { - if( sm == GUIEventAdapter::SCROLL_DOWN && _wheelZoomFactor > 0. || - sm == GUIEventAdapter::SCROLL_UP && _wheelZoomFactor < 0. ) + if( ((sm == GUIEventAdapter::SCROLL_DOWN && _wheelZoomFactor > 0.)) || + ((sm == GUIEventAdapter::SCROLL_UP && _wheelZoomFactor < 0.)) ) { if( getAnimationTime() <= 0. )