From f3e91bc10de42648f5f8c515b013f22218e14cd4 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Wed, 20 Feb 2013 17:30:34 -0600 Subject: [PATCH] Hopefully kill a stupid warning on Windows. --- Source/Core/Common/Src/FileUtil.cpp | 4 ++-- Source/Core/Common/Src/FileUtil.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index d6ab33962a..a2bd694438 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -781,9 +781,9 @@ IOFile::IOFile(IOFile&& other) Swap(other); } -IOFile& IOFile::operator=(IOFile other) +IOFile& IOFile::operator=(IOFile&& other) { - Swap(other); + IOFile(std::move(other)).Swap(*this); return *this; } diff --git a/Source/Core/Common/Src/FileUtil.h b/Source/Core/Common/Src/FileUtil.h index 2c8bf8f64b..b8e8d9c17c 100644 --- a/Source/Core/Common/Src/FileUtil.h +++ b/Source/Core/Common/Src/FileUtil.h @@ -160,7 +160,7 @@ public: ~IOFile(); IOFile(IOFile&& other); - IOFile& operator=(IOFile other); + IOFile& operator=(IOFile&& other); void Swap(IOFile& other);