aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/exec_br.cpp
diff options
context:
space:
mode:
authorColin Snover2017-12-19 19:27:13 -0600
committerEugene Sandulenko2018-08-18 16:30:05 +0200
commit481b608c51858d0b6afc3cfb461664fc9575c6a0 (patch)
tree984187ecdb5246049f02a7e46aa802739fedd93e /engines/parallaction/exec_br.cpp
parentbc3c8bd8d251b7a0631e1993e6365719382eacf6 (diff)
downloadscummvm-rg350-481b608c51858d0b6afc3cfb461664fc9575c6a0.tar.gz
scummvm-rg350-481b608c51858d0b6afc3cfb461664fc9575c6a0.tar.bz2
scummvm-rg350-481b608c51858d0b6afc3cfb461664fc9575c6a0.zip
PARALLACTION: Replace use of strdup with Common::String & malloc
Diffstat (limited to 'engines/parallaction/exec_br.cpp')
-rw-r--r--engines/parallaction/exec_br.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp
index c2fbc415af..a81b05dc87 100644
--- a/engines/parallaction/exec_br.cpp
+++ b/engines/parallaction/exec_br.cpp
@@ -72,7 +72,7 @@ typedef Common::Functor1Mem<ProgramContext&, void, ProgramExec_br> OpcodeV2;
extern const char *_instructionNamesRes_br[];
-void Parallaction_br::setupSubtitles(char *s, char *s2, int y) {
+void Parallaction_br::setupSubtitles(const char *s, const char *s2, int y) {
debugC(5, kDebugExec, "setupSubtitles(%s, %s, %i)", s, s2, y);
clearSubtitles();
@@ -123,7 +123,7 @@ DECLARE_COMMAND_OPCODE(location) {
_vm->_location._followerStartPosition = ctxt._cmd->_startPos2;
_vm->_location._followerStartFrame = 0;
- _vm->scheduleLocationSwitch(ctxt._cmd->_string);
+ _vm->scheduleLocationSwitch(ctxt._cmd->_string.c_str());
}
@@ -172,8 +172,8 @@ DECLARE_COMMAND_OPCODE(stop) {
DECLARE_COMMAND_OPCODE(character) {
- debugC(9, kDebugExec, "Parallaction_br::cmdOp_character(%s)", ctxt._cmd->_string);
- _vm->changeCharacter(ctxt._cmd->_string);
+ debugC(9, kDebugExec, "Parallaction_br::cmdOp_character(%s)", ctxt._cmd->_string.c_str());
+ _vm->changeCharacter(ctxt._cmd->_string.c_str());
}
@@ -291,7 +291,7 @@ DECLARE_COMMAND_OPCODE(give) {
DECLARE_COMMAND_OPCODE(text) {
- _vm->setupSubtitles(ctxt._cmd->_string, ctxt._cmd->_string2, ctxt._cmd->_zeta0);
+ _vm->setupSubtitles(ctxt._cmd->_string.c_str(), ctxt._cmd->_string2.c_str(), ctxt._cmd->_zeta0);
}
@@ -492,7 +492,7 @@ DECLARE_INSTRUCTION_OPCODE(print) {
DECLARE_INSTRUCTION_OPCODE(text) {
InstructionPtr inst = ctxt._inst;
- _vm->setupSubtitles(inst->_text, inst->_text2, inst->_y);
+ _vm->setupSubtitles(inst->_text.c_str(), inst->_text2.c_str(), inst->_y);
}