diff --git a/lib/base/string.cpp b/lib/base/string.cpp index 3c440cd77..bad3116a5 100644 --- a/lib/base/string.cpp +++ b/lib/base/string.cpp @@ -33,7 +33,7 @@ String::String(const String& other) : m_Data(other) { } -String::String(String&& other) +String::String(String&& other) noexcept : m_Data(std::move(other.m_Data)) { } @@ -66,7 +66,7 @@ String& String::operator=(const String& rhs) return *this; } -String& String::operator=(String&& rhs) +String& String::operator=(String&& rhs) noexcept { m_Data = std::move(rhs.m_Data); return *this; diff --git a/lib/base/string.hpp b/lib/base/string.hpp index 0eb08b527..896c74d0b 100644 --- a/lib/base/string.hpp +++ b/lib/base/string.hpp @@ -44,7 +44,7 @@ public: String(std::string data); String(String::SizeType n, char c); String(const String& other); - String(String&& other); + String(String&& other) noexcept; #ifndef _MSC_VER String(Value&& other); @@ -56,7 +56,7 @@ public: { } String& operator=(const String& rhs); - String& operator=(String&& rhs); + String& operator=(String&& rhs) noexcept; String& operator=(Value&& rhs); String& operator=(const std::string& rhs); String& operator=(const char *rhs);