Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. * When possible use a ranged for loop instead of begin() and end() iterators
This commit is contained in:
@@ -86,7 +86,7 @@ int AbstractMouseSelection::handleEvent(const SoEvent* const ev, const SbViewpor
|
||||
y = h-y; // the origin is at the left bottom corner (instead of left top corner)
|
||||
|
||||
if (ev->getTypeId().isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) {
|
||||
const SoMouseButtonEvent* const event = (const SoMouseButtonEvent*) ev;
|
||||
const auto event = (const SoMouseButtonEvent*) ev;
|
||||
const SbBool press = event->getState() == SoButtonEvent::DOWN ? true : false;
|
||||
|
||||
if (press) {
|
||||
|
||||
Reference in New Issue
Block a user