Skip to content

Commit

Permalink
+ fix gcc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Sep 27, 2015
1 parent fa5b160 commit cc446b1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Gui/MayaGestureNavigationStyle.cpp
Expand Up @@ -304,6 +304,8 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev)
}
}
break;
default:
break;
}
}
if (processed)
Expand Down Expand Up @@ -353,6 +355,8 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev)
}
processed = TRUE;
break;
default:
break;
}//switch key
}
if (processed)
Expand Down Expand Up @@ -381,7 +385,7 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev)
this->mousedownConsumedEvent[cnt] = *event;//hopefully, a shallow copy is enough. There are no pointers stored in events, apparently. Will loose a subclass, though.
cnt++;
assert(cnt<=2);
if(cnt>sizeof(mousedownConsumedEvent)){
if(cnt>static_cast<int>(sizeof(mousedownConsumedEvent))){
cnt=sizeof(mousedownConsumedEvent);//we are in trouble
}
processed = true;//just consume this event, and wait for the move threshold to be broken to start dragging/panning
Expand Down Expand Up @@ -490,8 +494,6 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev)
if (evIsButton) {
const SoMouseButtonEvent * const event = (const SoMouseButtonEvent *) ev;
const int button = event->getButton();
const SbBool press //the button was pressed (if false -> released)
= event->getState() == SoButtonEvent::DOWN ? TRUE : FALSE;
switch(button){
case SoMouseButtonEvent::BUTTON1:
case SoMouseButtonEvent::BUTTON2:
Expand All @@ -512,7 +514,6 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev)
//the essence part 1!
//mouse movement into camera motion. Suppress if in gesture. Ignore until threshold is surpassed.
if (evIsLoc2 && ! this->inGesture && this->mouseMoveThresholdBroken) {
const SoLocation2Event * const event = (const SoLocation2Event *) ev;
if (curmode == NavigationStyle::ZOOMING) {//doesn't happen
this->zoomByCursor(posn, prevnormalized);
processed = TRUE;
Expand Down Expand Up @@ -608,3 +609,4 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev)
finalize:
return processed;
}

0 comments on commit cc446b1

Please sign in to comment.