[Scummvm-cvs-logs] scummvm master -> 1e37f0b2efd2acd343bc199fa051c2f8a5da34df
dreammaster
dreammaster at scummvm.org
Fri Jul 3 22:02:23 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
1e37f0b2ef SHERLOCK: Change FixedText::getText to return const char *
Commit: 1e37f0b2efd2acd343bc199fa051c2f8a5da34df
https://github.com/scummvm/scummvm/commit/1e37f0b2efd2acd343bc199fa051c2f8a5da34df
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-07-03T16:01:20-04:00
Commit Message:
SHERLOCK: Change FixedText::getText to return const char *
Changed paths:
engines/sherlock/fixed_text.h
engines/sherlock/scalpel/scalpel_fixed_text.cpp
engines/sherlock/scalpel/scalpel_fixed_text.h
engines/sherlock/tattoo/tattoo_fixed_text.cpp
engines/sherlock/tattoo/tattoo_fixed_text.h
engines/sherlock/tattoo/widget_inventory.cpp
engines/sherlock/tattoo/widget_talk.cpp
diff --git a/engines/sherlock/fixed_text.h b/engines/sherlock/fixed_text.h
index 6542301..40444f4 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 c81896c..465940c 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 499fe81..eae86b8 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 1a40c70..2be41c8 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 06f6d76..a73f1a5 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 3d43dbe..3274552 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 2e2e3cf..6a3fd45 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;
}
More information about the Scummvm-git-logs
mailing list