aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2015-07-03 16:01:20 -0400
committerPaul Gilbert2015-07-03 16:01:20 -0400
commit1e37f0b2efd2acd343bc199fa051c2f8a5da34df (patch)
tree2151f36a34f82978b15460e51cc5483f8de8f227 /engines
parentd3a5db8ad75200f58f8f5ca7b10504e41aa9f6c2 (diff)
downloadscummvm-rg350-1e37f0b2efd2acd343bc199fa051c2f8a5da34df.tar.gz
scummvm-rg350-1e37f0b2efd2acd343bc199fa051c2f8a5da34df.tar.bz2
scummvm-rg350-1e37f0b2efd2acd343bc199fa051c2f8a5da34df.zip
SHERLOCK: Change FixedText::getText to return const char *
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/fixed_text.h2
-rw-r--r--engines/sherlock/scalpel/scalpel_fixed_text.cpp4
-rw-r--r--engines/sherlock/scalpel/scalpel_fixed_text.h2
-rw-r--r--engines/sherlock/tattoo/tattoo_fixed_text.cpp4
-rw-r--r--engines/sherlock/tattoo/tattoo_fixed_text.h2
-rw-r--r--engines/sherlock/tattoo/widget_inventory.cpp4
-rw-r--r--engines/sherlock/tattoo/widget_talk.cpp2
7 files changed, 10 insertions, 10 deletions
diff --git a/engines/sherlock/fixed_text.h b/engines/sherlock/fixed_text.h
index 6542301b2a..40444f4052 100644
--- a/engines/sherlock/fixed_text.h
+++ b/engines/sherlock/fixed_text.h
@@ -53,7 +53,7 @@ public:
/**
* Gets text
*/
- virtual const Common::String getText(int fixedTextId) = 0;
+ virtual const char *getText(int fixedTextId) = 0;
/**
* Get action message
diff --git a/engines/sherlock/scalpel/scalpel_fixed_text.cpp b/engines/sherlock/scalpel/scalpel_fixed_text.cpp
index c81896c913..465940ce45 100644
--- a/engines/sherlock/scalpel/scalpel_fixed_text.cpp
+++ b/engines/sherlock/scalpel/scalpel_fixed_text.cpp
@@ -359,8 +359,8 @@ ScalpelFixedText::ScalpelFixedText(SherlockEngine *vm) : FixedText(vm) {
_curLanguageEntry = curLanguageEntry;
}
-const Common::String ScalpelFixedText::getText(int fixedTextId) {
- return Common::String(_curLanguageEntry->fixedTextArray[fixedTextId]);
+const char *ScalpelFixedText::getText(int fixedTextId) {
+ return _curLanguageEntry->fixedTextArray[fixedTextId];
}
const Common::String ScalpelFixedText::getActionMessage(FixedTextActionId actionId, int messageIndex) {
diff --git a/engines/sherlock/scalpel/scalpel_fixed_text.h b/engines/sherlock/scalpel/scalpel_fixed_text.h
index 499fe81cd5..eae86b8f27 100644
--- a/engines/sherlock/scalpel/scalpel_fixed_text.h
+++ b/engines/sherlock/scalpel/scalpel_fixed_text.h
@@ -93,7 +93,7 @@ public:
/**
* Gets text
*/
- virtual const Common::String getText(int fixedTextId);
+ virtual const char *getText(int fixedTextId);
/**
* Get action message
diff --git a/engines/sherlock/tattoo/tattoo_fixed_text.cpp b/engines/sherlock/tattoo/tattoo_fixed_text.cpp
index 1a40c704ee..2be41c8e4a 100644
--- a/engines/sherlock/tattoo/tattoo_fixed_text.cpp
+++ b/engines/sherlock/tattoo/tattoo_fixed_text.cpp
@@ -62,8 +62,8 @@ static const char *const FIXED_TEXT_ENGLISH[] = {
TattooFixedText::TattooFixedText(SherlockEngine *vm) : FixedText(vm) {
}
-const Common::String TattooFixedText::getText(int fixedTextId) {
- return Common::String(FIXED_TEXT_ENGLISH[fixedTextId]);
+const char *TattooFixedText::getText(int fixedTextId) {
+ return FIXED_TEXT_ENGLISH[fixedTextId];
}
const Common::String TattooFixedText::getActionMessage(FixedTextActionId actionId, int messageIndex) {
diff --git a/engines/sherlock/tattoo/tattoo_fixed_text.h b/engines/sherlock/tattoo/tattoo_fixed_text.h
index 06f6d765d9..a73f1a5326 100644
--- a/engines/sherlock/tattoo/tattoo_fixed_text.h
+++ b/engines/sherlock/tattoo/tattoo_fixed_text.h
@@ -68,7 +68,7 @@ public:
/**
* Gets text
*/
- virtual const Common::String getText(int fixedTextId);
+ virtual const char *getText(int fixedTextId);
/**
* Get action message
diff --git a/engines/sherlock/tattoo/widget_inventory.cpp b/engines/sherlock/tattoo/widget_inventory.cpp
index 3d43dbe90f..3274552f5e 100644
--- a/engines/sherlock/tattoo/widget_inventory.cpp
+++ b/engines/sherlock/tattoo/widget_inventory.cpp
@@ -497,7 +497,7 @@ void WidgetInventory::handleEvents() {
}
if (!found)
- ui.putMessage("%s", FIXED(NoEffect).c_str());
+ ui.putMessage("%s", FIXED(NoEffect));
}
} else if ((_outsideMenu && !_bounds.contains(mousePos)) || ui._keyState.keycode == Common::KEYCODE_ESCAPE) {
// Want to close the window (clicked outside of it). So close the window and return to Standard
@@ -540,7 +540,7 @@ void WidgetInventory::handleEvents() {
}
}
if (!found)
- ui.putMessage("%s",FIXED(NoEffect).c_str());
+ ui.putMessage("%s", FIXED(NoEffect));
} else {
// See if they right clicked on an item
diff --git a/engines/sherlock/tattoo/widget_talk.cpp b/engines/sherlock/tattoo/widget_talk.cpp
index 2e2e3cf075..6a3fd4575d 100644
--- a/engines/sherlock/tattoo/widget_talk.cpp
+++ b/engines/sherlock/tattoo/widget_talk.cpp
@@ -406,7 +406,7 @@ void WidgetTalk::handleEvents() {
if (select == -1) {
talk.freeTalkVars();
- ui.putMessage("%s", FIXED(NothingToSay).c_str());
+ ui.putMessage("%s", FIXED(NothingToSay));
return;
}