Commit 84df4700 authored by Max Kellermann's avatar Max Kellermann

fs/io/FileReader: use std::exchange()

parent 5ca0b7a2
...@@ -49,9 +49,7 @@ public: ...@@ -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)),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment