+ fix gcc warnings

This commit is contained in:
wmayer 2015-09-27 11:25:39 +02:00
parent fa5b160887
commit cc446b1c5a

View File

@ -304,6 +304,8 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev)
}
}
break;
default:
break;
}
}
if (processed)
@ -353,6 +355,8 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev)
}
processed = TRUE;
break;
default:
break;
}//switch key
}
if (processed)
@ -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
@ -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:
@ -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;
@ -608,3 +609,4 @@ SbBool MayaGestureNavigationStyle::processSoEvent(const SoEvent * const ev)
finalize:
return processed;
}