Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Move local variable to inner scope.

Co-authored-by: Bertrand Coconnier <bcoconni@users.noreply.github.com>
  • Loading branch information
heshpdx and bcoconni authored Mar 4, 2023
1 parent f6d7914 commit 22375ed
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/initialization/FGInitialCondition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 22375ed

Please # to comment.