aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-08-02 22:26:00 +0200
committerStrangerke2014-08-02 22:26:00 +0200
commitf2de89c7bc3be8c6e77946c005ea7973276b5e0f (patch)
treed0f2d285a110be469c3fc945307cab414ab4754a /engines
parent3376ab4f622c0ff1998bfe792efa9e030783b047 (diff)
downloadscummvm-rg350-f2de89c7bc3be8c6e77946c005ea7973276b5e0f.tar.gz
scummvm-rg350-f2de89c7bc3be8c6e77946c005ea7973276b5e0f.tar.bz2
scummvm-rg350-f2de89c7bc3be8c6e77946c005ea7973276b5e0f.zip
CGE2: Fix CppCheck warnings by reducing variable scope
Diffstat (limited to 'engines')
-rw-r--r--engines/cge2/hero.cpp10
1 files 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())