aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base/base.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2013-10-01 23:20:24 +0200
committerWillem Jan Palenstijn2013-10-01 23:20:43 +0200
commita97907241051b493875950285f858c6e215238e3 (patch)
tree1c0223a2843cd141f4cfacf6c2ee9612a083cc18 /engines/wintermute/base/base.cpp
parente0dd19a21cb07ab4704991800e23bf4ac2dfb0ef (diff)
downloadscummvm-rg350-a97907241051b493875950285f858c6e215238e3.tar.gz
scummvm-rg350-a97907241051b493875950285f858c6e215238e3.tar.bz2
scummvm-rg350-a97907241051b493875950285f858c6e215238e3.zip
WINTERMUTE: Clean up byte/char casts in loading/parsing
Diffstat (limited to 'engines/wintermute/base/base.cpp')
-rw-r--r--engines/wintermute/base/base.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/wintermute/base/base.cpp b/engines/wintermute/base/base.cpp
index a64770c577..91ca30db70 100644
--- a/engines/wintermute/base/base.cpp
+++ b/engines/wintermute/base/base.cpp
@@ -87,7 +87,7 @@ TOKEN_DEF(NAME)
TOKEN_DEF(VALUE)
TOKEN_DEF_END
//////////////////////////////////////////////////////////////////////////
-bool BaseClass::parseEditorProperty(byte *buffer, bool complete) {
+bool BaseClass::parseEditorProperty(char *buffer, bool complete) {
TOKEN_TABLE_START(commands)
TOKEN_TABLE(EDITOR_PROPERTY)
TOKEN_TABLE(NAME)
@@ -100,12 +100,12 @@ bool BaseClass::parseEditorProperty(byte *buffer, bool complete) {
}
- byte *params;
+ char *params;
int cmd;
BaseParser parser;
if (complete) {
- if (parser.getCommand((char **)&buffer, commands, (char **)&params) != TOKEN_EDITOR_PROPERTY) {
+ if (parser.getCommand(&buffer, commands, &params) != TOKEN_EDITOR_PROPERTY) {
BaseEngine::LOG(0, "'EDITOR_PROPERTY' keyword expected.");
return STATUS_FAILED;
}
@@ -115,13 +115,13 @@ bool BaseClass::parseEditorProperty(byte *buffer, bool complete) {
char *propName = nullptr;
char *propValue = nullptr;
- while ((cmd = parser.getCommand((char **)&buffer, commands, (char **)&params)) > 0) {
+ while ((cmd = parser.getCommand(&buffer, commands, &params)) > 0) {
switch (cmd) {
case TOKEN_NAME:
delete[] propName;
- propName = new char[strlen((char *)params) + 1];
+ propName = new char[strlen(params) + 1];
if (propName) {
- strcpy(propName, (char *)params);
+ strcpy(propName, params);
} else {
cmd = PARSERR_GENERIC;
}
@@ -129,9 +129,9 @@ bool BaseClass::parseEditorProperty(byte *buffer, bool complete) {
case TOKEN_VALUE:
delete[] propValue;
- propValue = new char[strlen((char *)params) + 1];
+ propValue = new char[strlen(params) + 1];
if (propValue) {
- strcpy(propValue, (char *)params);
+ strcpy(propValue, params);
} else {
cmd = PARSERR_GENERIC;
}