diff options
author | Tobia Tesan | 2014-02-22 11:37:56 +0100 |
---|---|---|
committer | Tobia Tesan | 2014-10-15 21:36:46 +0200 |
commit | 578edde66fc87eb1d4f630cbd1a9e402172440fa (patch) | |
tree | 6e35912de8311178eb20349ad4e6d036a99a011f | |
parent | 856e281bf17a7adca88ded8bc93fd2e892bfa973 (diff) | |
download | scummvm-rg350-578edde66fc87eb1d4f630cbd1a9e402172440fa.tar.gz scummvm-rg350-578edde66fc87eb1d4f630cbd1a9e402172440fa.tar.bz2 scummvm-rg350-578edde66fc87eb1d4f630cbd1a9e402172440fa.zip |
WINTERMUTE: Const'fy members of class SubtitleCard
-rw-r--r-- | engines/wintermute/video/subtitle_card.cpp | 17 | ||||
-rw-r--r-- | engines/wintermute/video/subtitle_card.h | 12 |
2 files changed, 15 insertions, 14 deletions
diff --git a/engines/wintermute/video/subtitle_card.cpp b/engines/wintermute/video/subtitle_card.cpp index a0a88b12be..fb2ac06a84 100644 --- a/engines/wintermute/video/subtitle_card.cpp +++ b/engines/wintermute/video/subtitle_card.cpp @@ -31,27 +31,28 @@ namespace Wintermute { - -SubtitleCard::SubtitleCard(BaseGame *inGame, const Common::String &text, const uint &startFrame, const uint &endFrame) { +SubtitleCard::SubtitleCard(BaseGame *inGame, + const Common::String &text, + const uint &startFrame, + const uint &endFrame) : _gameRef(inGame), + _startFrame(startFrame), + _endFrame(endFrame) { // TODO: Fix expandStringByStringTable instead of this ugly hack char *tmp = new char[text.size()]; strcpy(tmp, text.c_str()); - _gameRef = inGame; _gameRef->expandStringByStringTable(&tmp); _text = Common::String(tmp); - _startFrame = startFrame; - _endFrame = endFrame; } -uint32 SubtitleCard::getStartFrame() { +uint32 SubtitleCard::getStartFrame() const { return _startFrame; } -uint32 SubtitleCard::getEndFrame() { +uint32 SubtitleCard::getEndFrame() const { return _endFrame; } -Common::String SubtitleCard::getText() { +Common::String SubtitleCard::getText() const { return _text; } diff --git a/engines/wintermute/video/subtitle_card.h b/engines/wintermute/video/subtitle_card.h index 6f2e47fe2b..7b372c76ad 100644 --- a/engines/wintermute/video/subtitle_card.h +++ b/engines/wintermute/video/subtitle_card.h @@ -38,13 +38,13 @@ class BaseGame; class SubtitleCard { public: SubtitleCard(BaseGame *inGame, const Common::String &text, const uint &startFrame, const uint &endFrame); - uint32 getEndFrame(); - uint32 getStartFrame(); - Common::String getText(); + uint32 getEndFrame() const; + uint32 getStartFrame() const; + Common::String getText() const; private: - BaseGame* _gameRef; - uint32 _endFrame; - uint32 _startFrame; + const BaseGame* _gameRef; + const uint32 _endFrame; + const uint32 _startFrame; Common::String _text; }; |