From bc774ca10e8bb9adb3bc0dbd769cf72ce3bdd909 Mon Sep 17 00:00:00 2001 From: Ian Curtis Date: Sun, 19 Dec 2021 17:48:38 +0000 Subject: [PATCH] methods should be marked as noexcept because they cannot throw --- Src/Util/NewConfig.cpp | 4 ++-- Src/Util/NewConfig.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Src/Util/NewConfig.cpp b/Src/Util/NewConfig.cpp index 0cda175..aff5aa4 100644 --- a/Src/Util/NewConfig.cpp +++ b/Src/Util/NewConfig.cpp @@ -299,7 +299,7 @@ namespace Util return *this; } - Node &Node::operator=(Node &&rhs) + Node &Node::operator=(Node &&rhs) noexcept { Swap(rhs); return *this; @@ -331,7 +331,7 @@ namespace Util DeepCopy(that); } - Node::Node(Node &&that) + Node::Node(Node &&that) noexcept { Swap(that); } diff --git a/Src/Util/NewConfig.h b/Src/Util/NewConfig.h index c3b1e2b..4ca138e 100644 --- a/Src/Util/NewConfig.h +++ b/Src/Util/NewConfig.h @@ -305,11 +305,11 @@ namespace Util void Serialize(std::ostream *os, size_t indent_level = 0) const; std::string ToString(size_t indent_level = 0) const; Node &operator=(const Node &rhs); - Node &operator=(Node &&rhs); + Node& operator=(Node&& rhs) noexcept; Node(const std::string &key); Node(const std::string &key, const std::string &value); Node(const Node &that); - Node(Node &&that); + Node(Node&& that) noexcept; ~Node(); }; } // Config