mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-04 03:15:59 -04:00
Move, not copy CustomRWops in
This commit is contained in:
parent
f803236e85
commit
e40e29dd8b
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user