From 48fd5f4ba23ce68b1218ae25e2e2bfcea9eb16b0 Mon Sep 17 00:00:00 2001 From: Domen Vrankar Date: Fri, 26 Sep 2014 22:57:07 +0200 Subject: [PATCH] -(mod) changed archive exception constructor to a sink as it should be noexcept --- archive_exception.cpp | 4 ++-- archive_exception.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/archive_exception.cpp b/archive_exception.cpp index 4955d32..2215f4c 100644 --- a/archive_exception.cpp +++ b/archive_exception.cpp @@ -30,8 +30,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace ns_archive { -archive_exception::archive_exception(const std::string& what) noexcept : - _what(what) +archive_exception::archive_exception(std::string&& what) noexcept : + _what(std::forward(what)) { // } diff --git a/archive_exception.hpp b/archive_exception.hpp index 1fcaa50..5c77ec4 100644 --- a/archive_exception.hpp +++ b/archive_exception.hpp @@ -37,7 +37,7 @@ namespace ns_archive { class archive_exception : public std::exception { public: - archive_exception(const std::string& what) noexcept; + archive_exception(std::string&& what) noexcept; const char* what() const noexcept override;