Fix move assignment.

This commit is contained in:
Victor Zverovich
2014-05-03 15:46:11 -07:00
parent 823ce5fc3d
commit 1a6d365db5
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -177,7 +177,8 @@ class File {
other.fd_ = -1;
}
File& operator=(File &&other) FMT_NOEXCEPT(true) {
File& operator=(File &&other) {
close();
fd_ = other.fd_;
other.fd_ = -1;
return *this;