From f2de89c7bc3be8c6e77946c005ea7973276b5e0f Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 2 Aug 2014 22:26:00 +0200 Subject: CGE2: Fix CppCheck warnings by reducing variable scope --- engines/cge2/hero.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp index 821b7386ee..3bb7c82713 100644 --- a/engines/cge2/hero.cpp +++ b/engines/cge2/hero.cpp @@ -72,11 +72,7 @@ Sprite *Hero::expand() { _dim[i][j].setVM(_vm); } - int cnt[kActions], - shpcnt = 0, - seqcnt = 0, - maxnow = 0, - maxnxt = 0; + int cnt[kActions]; for (int i = 0; i < kActions; i++) cnt[i] = 0; @@ -108,6 +104,10 @@ Sprite *Hero::expand() { ID id; Common::String line; char tmpStr[kLineMax + 1]; + int shpcnt = 0; + int seqcnt = 0; + int maxnow = 0; + int maxnxt = 0; for (line = sprf.readLine(); !sprf.eos(); line = sprf.readLine()) { if (line.empty()) -- cgit v1.2.3