From 0be434936ea3be0f9f5427e56daf52a95576e9d8 Mon Sep 17 00:00:00 2001 From: ehofman Date: Mon, 2 Nov 2009 13:26:45 +0000 Subject: [PATCH] John Denker: Simplify redundant code and superfluous variable --- src/Main/viewmgr.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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