aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/scriptables/script_ext_array.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/base/scriptables/script_ext_array.cpp')
-rw-r--r--engines/wintermute/base/scriptables/script_ext_array.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/wintermute/base/scriptables/script_ext_array.cpp b/engines/wintermute/base/scriptables/script_ext_array.cpp
index 5ed07f0da6..613cbd0758 100644
--- a/engines/wintermute/base/scriptables/script_ext_array.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_array.cpp
@@ -140,13 +140,13 @@ bool SXArray::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
//////////////////////////////////////////////////////////////////////////
-ScValue *SXArray::scGetProperty(const char *name) {
+ScValue *SXArray::scGetProperty(const Common::String &name) {
_scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
- if (strcmp(name, "Type") == 0) {
+ if (name == "Type") {
_scValue->setString("array");
return _scValue;
}
@@ -154,7 +154,7 @@ ScValue *SXArray::scGetProperty(const char *name) {
//////////////////////////////////////////////////////////////////////////
// Length
//////////////////////////////////////////////////////////////////////////
- else if (strcmp(name, "Length") == 0) {
+ else if (name == "Length") {
_scValue->setInt(_length);
return _scValue;
}
@@ -164,7 +164,7 @@ ScValue *SXArray::scGetProperty(const char *name) {
//////////////////////////////////////////////////////////////////////////
else {
char paramName[20];
- if (validNumber(name, paramName)) {
+ if (validNumber(name.c_str(), paramName)) { // TODO: Change to Common::String
return _values->getProp(paramName);
} else {
return _scValue;