From af3945f7f793c2979e38b30b8576e3a375e95428 Mon Sep 17 00:00:00 2001 From: "Curtis L. Olson" Date: Tue, 6 Sep 2016 11:11:06 -0500 Subject: [PATCH] Clean up some 'visually' misleading indentation (where the indentation suggests a different logic flow than is actually there.) --- src/Viewer/viewmgr.cxx | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Viewer/viewmgr.cxx b/src/Viewer/viewmgr.cxx index 1293523d0..6f463e313 100644 --- a/src/Viewer/viewmgr.cxx +++ b/src/Viewer/viewmgr.cxx @@ -223,31 +223,31 @@ FGViewMgr::setView (int newview) return; } - // negative numbers -> set view with node index -newview - if (newview < 0) { - for (int i = 0; i < (int)config_list.size(); i++) { - int index = -config_list[i]->getIndex(); - if (index == newview) - newview = i; + // negative numbers -> set view with node index -newview + if (newview < 0) { + for (int i = 0; i < (int)config_list.size(); i++) { + int index = -config_list[i]->getIndex(); + if (index == newview) + newview = i; + } + if (newview < 0) + return; } + + // if newview number too low wrap to last view... if (newview < 0) - return; - } + newview = (int)views.size() - 1; - // if newview number too low wrap to last view... - if (newview < 0) - newview = (int)views.size() - 1; - - // if newview number to high wrap to zero... - if (newview >= (int)views.size()) - newview = 0; + // if newview number to high wrap to zero... + if (newview >= (int)views.size()) + newview = 0; if (get_current_view()) { - get_current_view()->unbind(); + get_current_view()->unbind(); } - // set new view - current = newview; + // set new view + current = newview; if (get_current_view()) { get_current_view()->bind();