From ad586412425e66e0e678f0cfd7b8c78c58a8a855 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Mon, 28 Oct 2013 18:23:05 +0100 Subject: WINTERMUTE: Fix compile errors in XCode 5 caused by nullptr-issues. --- engines/wintermute/base/base.cpp | 2 +- engines/wintermute/base/base.h | 2 +- engines/wintermute/base/base_parser.cpp | 4 ++-- engines/wintermute/video/video_theora_player.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'engines') diff --git a/engines/wintermute/base/base.cpp b/engines/wintermute/base/base.cpp index 91ca30db70..6a0666b36e 100644 --- a/engines/wintermute/base/base.cpp +++ b/engines/wintermute/base/base.cpp @@ -60,7 +60,7 @@ Common::String BaseClass::getEditorProp(const Common::String &propName, const Co if (_editorPropsIter != _editorProps.end()) { return _editorPropsIter->_value.c_str(); } else { - return initVal; + return initVal; // Used to be NULL } } diff --git a/engines/wintermute/base/base.h b/engines/wintermute/base/base.h index f4b0976019..8767cc9bdd 100644 --- a/engines/wintermute/base/base.h +++ b/engines/wintermute/base/base.h @@ -44,7 +44,7 @@ class BaseClass { public: bool _persistable; bool setEditorProp(const Common::String &propName, const Common::String &propValue); - Common::String getEditorProp(const Common::String &propName, const Common::String &initVal = nullptr); + Common::String getEditorProp(const Common::String &propName, const Common::String &initVal = Common::String()); BaseClass(TDynamicConstructor, TDynamicConstructor) {} bool parseEditorProperty(char *buffer, bool complete = true); virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent = 0); diff --git a/engines/wintermute/base/base_parser.cpp b/engines/wintermute/base/base_parser.cpp index 0b677b6cb2..ff9c6c81b0 100644 --- a/engines/wintermute/base/base_parser.cpp +++ b/engines/wintermute/base/base_parser.cpp @@ -250,10 +250,10 @@ Common::String BaseParser::getToken(char **buf) { *t++ = 0; } else if (*b == 0) { *buf = b; - return nullptr; + return Common::String(); } else { // Error. - return nullptr; + return Common::String(); } *buf = b; diff --git a/engines/wintermute/video/video_theora_player.h b/engines/wintermute/video/video_theora_player.h index a4f1b9edd6..7b28a71e17 100644 --- a/engines/wintermute/video/video_theora_player.h +++ b/engines/wintermute/video/video_theora_player.h @@ -62,7 +62,7 @@ public: //CVidSubtitler *_subtitler; // control methods - bool initialize(const Common::String &filename, const Common::String &subtitleFile = nullptr); + bool initialize(const Common::String &filename, const Common::String &subtitleFile = Common::String()); bool initializeSimple(); bool update(); bool play(TVideoPlayback type = VID_PLAY_CENTER, int x = 0, int y = 0, bool freezeGame = false, bool freezeMusic = true, bool looping = false, uint32 startTime = 0, float forceZoom = -1.0f, int volume = -1); -- cgit v1.2.3