diff options
author | yinsimei | 2017-07-11 14:57:31 +0200 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-13 18:27:45 +0200 |
commit | 800987ab95c4faa5532d735a85516fd09f5de724 (patch) | |
tree | df71c20322ddfd8b441fa120face21663ea9e164 /engines/sludge/bg_effects.cpp | |
parent | 19ff9f419baae348b153c45c2857a7cccb33f725 (diff) | |
download | scummvm-rg350-800987ab95c4faa5532d735a85516fd09f5de724.tar.gz scummvm-rg350-800987ab95c4faa5532d735a85516fd09f5de724.tar.bz2 scummvm-rg350-800987ab95c4faa5532d735a85516fd09f5de724.zip |
SLUDGE: replace char *by Common::String
Diffstat (limited to 'engines/sludge/bg_effects.cpp')
-rw-r--r-- | engines/sludge/bg_effects.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/sludge/bg_effects.cpp b/engines/sludge/bg_effects.cpp index 40f60e3b1d..0ec538dc49 100644 --- a/engines/sludge/bg_effects.cpp +++ b/engines/sludge/bg_effects.cpp @@ -158,7 +158,7 @@ void blur_loadSettings(Common::SeekableReadStream *stream) { bool blur_createSettings(int numParams, variableStack *&stack) { bool createNullThing = true; - const char *error = NULL; + Common::String error = ""; if (numParams >= 3) { // PARAMETERS: base, divide, stack (, stack (, stack...)) @@ -187,18 +187,18 @@ bool blur_createSettings(int numParams, variableStack *&stack) { } } - if (width == 0 && !error) { + if (width == 0 && error.empty()) { error = "Empty arrays found in setBackgroundEffect parameters"; } - if (!error) { + if (error.empty()) { s_matrixEffectWidth = width; s_matrixEffectHeight = height; if (blur_allocateMemoryForEffect()) { for (int y = height - 1; y >= 0; y--) { variableStack *eachNumber = stack->thisVar.varData.theStack->first; - if (!error) { + if (error.empty()) { for (int x = 0; x < width; x++) { int arraySlot = x + (y * width); // s_matrixEffectData[arraySlot] = (rand() % 4); @@ -211,13 +211,13 @@ bool blur_createSettings(int numParams, variableStack *&stack) { trimStack(stack); } } - if (!error && !getValueType(s_matrixEffectDivide, SVT_INT, stack->thisVar)) + if (error.empty() && !getValueType(s_matrixEffectDivide, SVT_INT, stack->thisVar)) error = ""; trimStack(stack); - if (!error && !getValueType(s_matrixEffectBase, SVT_INT, stack->thisVar)) + if (error.empty() && !getValueType(s_matrixEffectBase, SVT_INT, stack->thisVar)) error = ""; trimStack(stack); - if (!error) { + if (error.empty()) { if (s_matrixEffectDivide) { createNullThing = false; } else { @@ -243,7 +243,7 @@ bool blur_createSettings(int numParams, variableStack *&stack) { s_matrixEffectData = NULL; } - if (error && error[0]) { + if (!error.empty()) { fatal(error); } |