From 22375edbe59e2cca274f09da31bf0adf7724a8e2 Mon Sep 17 00:00:00 2001 From: Mahesh Madhav <67384846+heshpdx@users.noreply.github.com> Date: Sat, 4 Mar 2023 08:56:40 -0800 Subject: [PATCH] Apply suggestions from code review Move local variable to inner scope. Co-authored-by: Bertrand Coconnier --- src/initialization/FGInitialCondition.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/initialization/FGInitialCondition.cpp b/src/initialization/FGInitialCondition.cpp index 9035ac721..51648b3f5 100644 --- a/src/initialization/FGInitialCondition.cpp +++ b/src/initialization/FGInitialCondition.cpp @@ -1027,12 +1027,11 @@ bool FGInitialCondition::Load(const SGPath& rstfile, bool useStoredPath) throw BaseException(s.str()); } - double version = HUGE_VAL; bool result = false; // If doc has an version, check it. Otherwise fall back to legacy. if (document->HasAttribute("version")) { - version = document->GetAttributeValueAsNumber("version"); + double version = document->GetAttributeValueAsNumber("version"); if (version >= 3.0) { const string s("Only initialization file formats 1 and 2 are currently supported");