From 07c110d5f7670bbf54f05d117bbabdd43c46311d Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Wed, 30 Nov 2016 16:51:20 +0100 Subject: [PATCH] - Fixed GCC compilation error. It didn't like 'cvar' being declared between 'goto foundit' and the 'foundit' label. --- src/scripting/codegeneration/codegen.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/scripting/codegeneration/codegen.cpp b/src/scripting/codegeneration/codegen.cpp index 28b20e289b..da919e139a 100644 --- a/src/scripting/codegeneration/codegen.cpp +++ b/src/scripting/codegeneration/codegen.cpp @@ -5590,8 +5590,7 @@ FxExpression *FxIdentifier::Resolve(FCompileContext& ctx) goto foundit; } - auto cvar = FindCVar(Identifier.GetChars(), nullptr); - if (cvar != nullptr) + if (auto *cvar = FindCVar(Identifier.GetChars(), nullptr)) { if (cvar->GetFlags() & CVAR_USERINFO) {