Move, not copy CustomRWops in

This commit is contained in:
Dmitry Marakasov 2015-01-12 23:44:38 +03:00
parent f803236e85
commit e40e29dd8b

View File

@ -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<void*>(new C(custom_rwops));
rwops_->hidden.unknown.data1 = static_cast<void*>(new C(std::move(custom_rwops)));
} catch (...) {
SDL_FreeRW(rwops_);
throw;