Browse Source

[common/virtual_buffer] fix technically wrong usage of std::exchange() (#3992)

simpleish fix https://en.cppreference.com/cpp/utility/exchange

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3992
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
pull/3999/head
lizzie 1 week ago
committed by crueter
parent
commit
889545e1ee
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 3
      src/common/virtual_buffer.h

3
src/common/virtual_buffer.h

@ -38,7 +38,8 @@ public:
VirtualBuffer& operator=(const VirtualBuffer&) = delete;
VirtualBuffer(VirtualBuffer&& other) noexcept
: alloc_size{std::exchange(other.alloc_size, 0)}, base_ptr{std::exchange(other.base_ptr), nullptr}
: alloc_size{std::exchange(other.alloc_size, 0)}
, base_ptr{std::exchange(other.base_ptr, nullptr)}
{}
VirtualBuffer& operator=(VirtualBuffer&& other) noexcept {

Loading…
Cancel
Save