fs/io/FileReader: use std::exchange()
This commit is contained in:
parent
5ca0b7a28f
commit
84df470008
@ -49,9 +49,7 @@ public:
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
FileReader(FileReader &&other) noexcept
|
FileReader(FileReader &&other) noexcept
|
||||||
:path(std::move(other.path)),
|
:path(std::move(other.path)),
|
||||||
handle(other.handle) {
|
handle(std::exchange(other.handle, INVALID_HANDLE_VALUE)) {}
|
||||||
other.handle = INVALID_HANDLE_VALUE;
|
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
FileReader(FileReader &&other) noexcept
|
FileReader(FileReader &&other) noexcept
|
||||||
:path(std::move(other.path)),
|
:path(std::move(other.path)),
|
||||||
|
Loading…
Reference in New Issue
Block a user