From: ehofman Date: Mon, 2 Nov 2009 13:26:45 +0000 (+0000) Subject: John Denker: Simplify redundant code and superfluous variable X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0be434936ea3be0f9f5427e56daf52a95576e9d8;p=flightgear.git John Denker: Simplify redundant code and superfluous variable --- diff --git a/src/Main/viewmgr.cxx b/src/Main/viewmgr.cxx index 6dbc5f2ad..d73ef8744 100644 --- a/src/Main/viewmgr.cxx +++ b/src/Main/viewmgr.cxx @@ -241,11 +241,10 @@ FGViewMgr::unbind () void FGViewMgr::update (double dt) { - FGViewer * view = get_current_view(); - if (view == 0) - return; FGViewer *loop_view = (FGViewer *)get_view(current); + if (loop_view == 0) return; + SGPropertyNode *n = config_list[current]; double lon_deg, lat_deg, alt_ft, roll_deg, pitch_deg, heading_deg; @@ -293,7 +292,7 @@ FGViewMgr::update (double dt) // Update the current view do_axes(); - view->update(dt); + loop_view->update(dt); abs_viewer_position = loop_view->getViewPosition(); // update audio listener values