From: Curtis L. Olson Date: Tue, 6 Sep 2016 16:11:06 +0000 (-0500) Subject: Clean up some 'visually' misleading indentation (where the indentation suggests X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a74c18223d5300a60b2c1348597c5def3e4963b3;p=flightgear.git Clean up some 'visually' misleading indentation (where the indentation suggests a different logic flow than is actually there.) --- 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 < 0) - return; - } - // if newview number too low wrap to last view... - if (newview < 0) - 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();