From ed2bf03a4bf604adac4dea1288a0b22d698aef6e Mon Sep 17 00:00:00 2001 From: Jan Travnicek <jan.travnicek@.fit.cvut.cz> Date: Tue, 28 May 2019 13:51:22 +0200 Subject: [PATCH] add some missing noexcepts --- alib2abstraction/src/registration/AlgoRegistration.hpp | 6 +++--- alib2std/src/extensions/container/ptr_value.hpp | 6 +++--- alib2std/src/extensions/registration.hpp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/alib2abstraction/src/registration/AlgoRegistration.hpp b/alib2abstraction/src/registration/AlgoRegistration.hpp index eb37fd9637..8e92912177 100644 --- a/alib2abstraction/src/registration/AlgoRegistration.hpp +++ b/alib2abstraction/src/registration/AlgoRegistration.hpp @@ -46,7 +46,7 @@ public: AbstractRegister ( ReturnType ( * callback ) ( ParameterTypes ... ), ParamNames ... paramNames ) : AbstractRegister ( callback, abstraction::AlgorithmCategories::AlgorithmCategory::DEFAULT, paramNames ... ) { } - AbstractRegister ( AbstractRegister && ) = default; + AbstractRegister ( AbstractRegister && ) noexcept = default; AbstractRegister && setDocumentation ( std::string documentation ) && { abstraction::AlgorithmRegistry::setDocumentationOfAlgorithm < Algorithm, ParameterTypes ... > ( m_category, std::move ( documentation ) ); @@ -67,7 +67,7 @@ public: } ) { } - WrapperRegister ( WrapperRegister && ) = default; + WrapperRegister ( WrapperRegister && ) noexcept = default; WrapperRegister && setDocumentation ( std::string documentation ) && { abstraction::AlgorithmRegistry::setDocumentationOfWrapper < Algorithm, ParameterTypes ... > ( std::move ( documentation ) ); @@ -92,7 +92,7 @@ public: } ), m_methodName ( methodName ) { } - MethodRegister ( MethodRegister && ) = default; + MethodRegister ( MethodRegister && ) noexcept = default; MethodRegister && setDocumentation ( std::string documentation ) && { abstraction::AlgorithmRegistry::setDocumentationOfMethod < Algorithm, ObjectType, ParameterTypes ... > ( m_methodName, std::move ( documentation ) ); diff --git a/alib2std/src/extensions/container/ptr_value.hpp b/alib2std/src/extensions/container/ptr_value.hpp index d66bf7302a..aa971f64c9 100644 --- a/alib2std/src/extensions/container/ptr_value.hpp +++ b/alib2std/src/extensions/container/ptr_value.hpp @@ -98,7 +98,7 @@ public: * * \param other the other instance */ - ptr_value ( ptr_value && other ) : m_data ( other.m_data ) { + ptr_value ( ptr_value && other ) noexcept : m_data ( other.m_data ) { other.m_data = nullptr; }; @@ -123,7 +123,7 @@ public: * * \param other the other instance. */ - ptr_value & operator = ( ptr_value && other ) { + ptr_value & operator = ( ptr_value && other ) noexcept { using std::swap; swap ( m_data, other.m_data ); @@ -135,7 +135,7 @@ public: * \brief * Destructor will free the owned instance. */ - ~ptr_value ( ) { + ~ptr_value ( ) noexcept { delete m_data; } diff --git a/alib2std/src/extensions/registration.hpp b/alib2std/src/extensions/registration.hpp index 378540c916..c6d6e42438 100644 --- a/alib2std/src/extensions/registration.hpp +++ b/alib2std/src/extensions/registration.hpp @@ -45,7 +45,7 @@ public: Register ( const Register & ) = delete; - Register ( Register && other ) : data ( std::move ( other.data ) ), m_finish ( other.m_finish ) { + Register ( Register && other ) noexcept : data ( std::move ( other.data ) ), m_finish ( other.m_finish ) { other.m_finish = [] ( T ) { }; } @@ -73,7 +73,7 @@ public: Register ( const Register & ) = delete; - Register ( Register && other ) : m_finish ( other.m_finish ) { + Register ( Register && other ) noexcept : m_finish ( other.m_finish ) { other.m_finish = [] ( ) { }; } -- GitLab