Skip to content

Commit

Permalink
WAGE: Simplify operand stringification
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Feb 14, 2016
1 parent e56fa50 commit eacbe42
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions engines/wage/script.h
Expand Up @@ -77,7 +77,6 @@ class Script {
Designed *inputClick;
} _value;
OperandType _type;
Common::String _str;

Operand(Obj *value, OperandType type) {
_value.obj = value;
Expand Down Expand Up @@ -115,15 +114,9 @@ class Script {
}

Common::String toString() {
char buf[128];

if (_value.obj == NULL)
_str = "";

switch(_type) {
case NUMBER:
_str = snprintf(buf, 128, "%d", _value.number);
return _str;
return Common::String::format("%d", _value.number);
case STRING:
case TEXT_INPUT:
return *_value.string;
Expand Down

0 comments on commit eacbe42

Please sign in to comment.