From d43732ac47bacab53578c6217cb4dbd42da6b9c6 Mon Sep 17 00:00:00 2001 From: Colin Snover Date: Tue, 5 Dec 2017 11:24:39 -0600 Subject: IOS: Replace strdup with Common::String --- backends/platform/ios7/ios7_osys_main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'backends/platform/ios7/ios7_osys_main.cpp') diff --git a/backends/platform/ios7/ios7_osys_main.cpp b/backends/platform/ios7/ios7_osys_main.cpp index 90c294a7d5..118ac22dae 100644 --- a/backends/platform/ios7/ios7_osys_main.cpp +++ b/backends/platform/ios7/ios7_osys_main.cpp @@ -111,7 +111,7 @@ OSystem_iOS7::OSystem_iOS7() : _screenOrientation(kScreenOrientationFlippedLandscape), _mouseClickAndDragEnabled(false), _gestureStartX(-1), _gestureStartY(-1), _fullScreenIsDirty(false), _fullScreenOverlayIsDirty(false), _mouseDirty(false), _timeSuspended(0), _lastDragPosX(-1), _lastDragPosY(-1), _screenChangeCount(0), - _lastErrorMessage(NULL), _mouseCursorPaletteEnabled(false), _gfxTransactionError(kTransactionSuccess) { + _mouseCursorPaletteEnabled(false), _gfxTransactionError(kTransactionSuccess) { _queuedInputEvent.type = Common::EVENT_INVALID; _touchpadModeEnabled = !iOS7_isBigDevice(); #ifdef IPHONE_SANDBOXED @@ -352,8 +352,7 @@ void OSystem_iOS7::logMessage(LogMessageType::Type type, const char *message) { output = stderr; if (type == LogMessageType::kError) { - free(_lastErrorMessage); - _lastErrorMessage = strdup(message); + _lastErrorMessage = message; } fputs(message, output); -- cgit v1.2.3