From 824ffe6525dbb9f27cd4a6cfeac54a6971a67a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sun, 10 May 2020 18:41:14 +0200 Subject: [PATCH] Inline and default LazyExpression's constructor --- src/catch2/internal/catch_assertion_handler.cpp | 6 ------ src/catch2/internal/catch_assertion_handler.hpp | 6 ++++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/catch2/internal/catch_assertion_handler.cpp b/src/catch2/internal/catch_assertion_handler.cpp index e21294d5..14036062 100644 --- a/src/catch2/internal/catch_assertion_handler.cpp +++ b/src/catch2/internal/catch_assertion_handler.cpp @@ -26,12 +26,6 @@ namespace Catch { } } - LazyExpression::LazyExpression( bool isNegated ) - : m_isNegated( isNegated ) - {} - - LazyExpression::LazyExpression( LazyExpression const& other ) : m_isNegated( other.m_isNegated ) {} - auto operator << ( std::ostream& os, LazyExpression const& lazyExpr ) -> std::ostream& { if( lazyExpr.m_isNegated ) os << "!"; diff --git a/src/catch2/internal/catch_assertion_handler.hpp b/src/catch2/internal/catch_assertion_handler.hpp index 0512f17f..646f12f4 100644 --- a/src/catch2/internal/catch_assertion_handler.hpp +++ b/src/catch2/internal/catch_assertion_handler.hpp @@ -27,8 +27,10 @@ namespace Catch { ITransientExpression const* m_transientExpression = nullptr; bool m_isNegated; public: - LazyExpression( bool isNegated ); - LazyExpression( LazyExpression const& other ); + LazyExpression( bool isNegated ): + m_isNegated(isNegated) + {} + LazyExpression(LazyExpression const& other) = default; LazyExpression& operator = ( LazyExpression const& ) = delete; explicit operator bool() const {