From cb7c0d1df4dd5d979aed0e1c45fc571fc3b128c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sun, 20 Aug 2017 23:54:17 +0200 Subject: [PATCH] Use std::move for RideCreateAction::Execute Fixes compilation with ICC and Xcode 8 --- src/openrct2/actions/RideCreateAction.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/openrct2/actions/RideCreateAction.hpp b/src/openrct2/actions/RideCreateAction.hpp index 550088af2f..0dfa88089d 100644 --- a/src/openrct2/actions/RideCreateAction.hpp +++ b/src/openrct2/actions/RideCreateAction.hpp @@ -97,7 +97,7 @@ public: { res->Error = GA_ERROR::INVALID_PARAMETERS; res->ErrorMessage = STR_INVALID_RIDE_TYPE; - return res; + return std::move(res); } } } @@ -106,7 +106,7 @@ public: { res->Error = GA_ERROR::INVALID_PARAMETERS; res->ErrorMessage = STR_INVALID_RIDE_TYPE; - return res; + return std::move(res); } sint32 rideEntryIndex = subType; @@ -115,7 +115,7 @@ public: { res->Error = GA_ERROR::DISALLOWED; res->ErrorMessage = STR_TOO_MANY_RIDES; - return res; + return std::move(res); } res->rideIndex = rideIndex; @@ -128,7 +128,7 @@ public: log_warning("Invalid request for ride %u", rideIndex); res->Error = GA_ERROR::UNKNOWN; res->ErrorMessage = STR_UNKNOWN_OBJECT_TYPE; - return res; + return std::move(res); } ride->type = rideType; @@ -308,7 +308,7 @@ public: res->ExpenditureType = RCT_EXPENDITURE_TYPE_RIDE_CONSTRUCTION; res->Position.x = (uint16)0x8000; - return res; + return std::move(res); } };