From 336ab6bcf31df95edccc8bafce11149650ddeb46 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 21 Oct 2020 21:19:57 +0200 Subject: Add noexcept annotations to C++ Wrapper base class --- include/pugl/pugl.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/pugl') diff --git a/include/pugl/pugl.hpp b/include/pugl/pugl.hpp index d62ecca..2097534 100644 --- a/include/pugl/pugl.hpp +++ b/include/pugl/pugl.hpp @@ -64,14 +64,14 @@ public: Wrapper(const Wrapper&) = delete; Wrapper& operator=(const Wrapper&) = delete; - Wrapper(Wrapper&&) = default; - Wrapper& operator=(Wrapper&&) = default; + Wrapper(Wrapper&&) noexcept = default; + Wrapper& operator=(Wrapper&&) noexcept = default; - T* cobj() { return _ptr.get(); } - const T* cobj() const { return _ptr.get(); } + T* cobj() noexcept { return _ptr.get(); } + const T* cobj() const noexcept { return _ptr.get(); } protected: - explicit Wrapper(T* ptr) + explicit Wrapper(T* ptr) noexcept : _ptr(ptr, Deleter{}) {} @@ -202,7 +202,7 @@ static_assert(Status(PUGL_UNSUPPORTED_TYPE) == Status::unsupportedType, ""); /// @copydoc puglStrerror static inline const char* -strerror(const pugl::Status status) +strerror(const pugl::Status status) noexcept { return puglStrerror(static_cast(status)); } -- cgit v1.2.1