diff options
author | Einar Johan Trøan Sømåen | 2012-05-11 14:16:50 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-06-02 12:59:09 +0200 |
commit | 61945782d6a73967d122f38a4f97f9b7377abdea (patch) | |
tree | 1d3dfb3542cbcb3f035aebe739783a77ddd5d866 /engines/wintermute/UIObject.cpp | |
parent | 7bd6151127e072f4f270a62654398db74dc7085c (diff) | |
download | scummvm-rg350-61945782d6a73967d122f38a4f97f9b7377abdea.tar.gz scummvm-rg350-61945782d6a73967d122f38a4f97f9b7377abdea.tar.bz2 scummvm-rg350-61945782d6a73967d122f38a4f97f9b7377abdea.zip |
WINTERMUTE: Add const to almost all char *Filename instances.
Although done semi-automatically, almost all of these accesses don't need write-access
to the string, this simplifies debugging a bit, and opens the possibility of adding in
Common::String as a replacement down the line.
This DOES change quite a bit of code, and has regressions wrt drawing, probably some
super-classes don't fully match their sub-classes wrt virtual functions any more.
Diffstat (limited to 'engines/wintermute/UIObject.cpp')
-rw-r--r-- | engines/wintermute/UIObject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/wintermute/UIObject.cpp b/engines/wintermute/UIObject.cpp index bf0cad25b9..75939c5bf6 100644 --- a/engines/wintermute/UIObject.cpp +++ b/engines/wintermute/UIObject.cpp @@ -163,7 +163,7 @@ HRESULT CUIObject::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th Stack->CorrectParams(1);
CScValue *Val = Stack->Pop();
- char *Filename = Val->GetString();
+ const char *Filename = Val->GetString();
delete _image;
_image = NULL;
@@ -238,7 +238,7 @@ HRESULT CUIObject::ScCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th }
// find by name
else {
- char *name = val->GetString();
+ const char *name = val->GetString();
for (i = 0; i < win->_widgets.GetSize(); i++) {
if (scumm_stricmp(win->_widgets[i]->_name, name) == 0) {
found = true;
|