From e40e29dd8b17a2c9c7d50f1d4f118d1eeff695c7 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Mon, 12 Jan 2015 23:44:38 +0300 Subject: [PATCH] Move, not copy CustomRWops in --- SDL2pp/RWops.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDL2pp/RWops.hh b/SDL2pp/RWops.hh index cb36c58..6210378 100644 --- a/SDL2pp/RWops.hh +++ b/SDL2pp/RWops.hh @@ -277,7 +277,7 @@ public: rwops_->close = CustomCloseFuncWrapper; rwops_->type = 0x57524370; // "pCRW" for libSDLp[p] [C]ustom [RW]ops try { - rwops_->hidden.unknown.data1 = static_cast(new C(custom_rwops)); + rwops_->hidden.unknown.data1 = static_cast(new C(std::move(custom_rwops))); } catch (...) { SDL_FreeRW(rwops_); throw;