diff options
author | uruk | 2014-06-08 12:55:19 +0200 |
---|---|---|
committer | uruk | 2014-06-08 12:55:19 +0200 |
commit | ba8bc2e40b94aa6055222550651452c3645c2515 (patch) | |
tree | ddb61befed3a440b9619616a27d4a7cb4aeac53a /engines/cge2 | |
parent | acbd19bec43302ec97e0f00513351410dc540618 (diff) | |
download | scummvm-rg350-ba8bc2e40b94aa6055222550651452c3645c2515.tar.gz scummvm-rg350-ba8bc2e40b94aa6055222550651452c3645c2515.tar.bz2 scummvm-rg350-ba8bc2e40b94aa6055222550651452c3645c2515.zip |
CGE2: Rework empty-checks of strings.
Diffstat (limited to 'engines/cge2')
-rw-r--r-- | engines/cge2/cge2_main.cpp | 4 | ||||
-rw-r--r-- | engines/cge2/hero.cpp | 2 | ||||
-rw-r--r-- | engines/cge2/map.cpp | 2 | ||||
-rw-r--r-- | engines/cge2/talk.cpp | 2 | ||||
-rw-r--r-- | engines/cge2/vga13h.cpp | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp index e256d72db6..20b16fa227 100644 --- a/engines/cge2/cge2_main.cpp +++ b/engines/cge2/cge2_main.cpp @@ -168,7 +168,7 @@ void CGE2Engine::loadSprite(const char *fname, int ref, int scene, V3D &pos) { Common::String line; for (line = sprf.readLine(); !sprf.eos(); line = sprf.readLine()){ - if (line.size() == 0) + if (line.empty()) continue; Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr)); @@ -313,7 +313,7 @@ void CGE2Engine::loadScript(const char *fname) { Common::String line; for (line = scrf.readLine(); !scrf.eos(); line = scrf.readLine()) { - if (line.size() == 0) + if (line.empty()) continue; char *p; diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp index 62568aecaa..de0dc2688a 100644 --- a/engines/cge2/hero.cpp +++ b/engines/cge2/hero.cpp @@ -92,7 +92,7 @@ Sprite *Hero::expand() { // It's very similar to Sprite's expand, but doesn't bo int maxnxt = 0; for (line = sprf.readLine(); !sprf.eos(); line = sprf.readLine()) { - if (line.size() == 0) + if (line.empty()) continue; Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr)); diff --git a/engines/cge2/map.cpp b/engines/cge2/map.cpp index 579f44b681..6dbf57f08d 100644 --- a/engines/cge2/map.cpp +++ b/engines/cge2/map.cpp @@ -52,7 +52,7 @@ void Map::load(int scene) { Common::String line; for (line = file.readLine(); !file.eos(); line = file.readLine()) { - if (line.size() == 0) + if (line.empty()) continue; char tmpStr[kLineMax + 1]; diff --git a/engines/cge2/talk.cpp b/engines/cge2/talk.cpp index ee4a675fc3..acadd2e001 100644 --- a/engines/cge2/talk.cpp +++ b/engines/cge2/talk.cpp @@ -81,7 +81,7 @@ void Font::load() { int n = 0; for (line = colorFile.readLine(); !colorFile.eos(); line = colorFile.readLine()){ - if (line.size() == 0) + if (line.empty()) continue; Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr)); diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp index 60323913a8..7da9535030 100644 --- a/engines/cge2/vga13h.cpp +++ b/engines/cge2/vga13h.cpp @@ -246,7 +246,7 @@ Sprite *Sprite::expand() { char tmpStr[kLineMax + 1]; for (line = sprf.readLine(); !sprf.eos(); line = sprf.readLine()) { - if (line.size() == 0) + if (line.empty()) continue; Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr)); |