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