From 9e5cbee3765712690f1db8d0d398477e04887b42 Mon Sep 17 00:00:00 2001 From: Flamefire Date: Wed, 21 Nov 2018 11:19:05 +0100 Subject: [PATCH] Fixes from review comments --- include/turtle/detail/function_impl_template.hpp | 2 +- include/turtle/detail/singleton.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/turtle/detail/function_impl_template.hpp b/include/turtle/detail/function_impl_template.hpp index 8cc79af..8e34e39 100644 --- a/include/turtle/detail/function_impl_template.hpp +++ b/include/turtle/detail/function_impl_template.hpp @@ -257,7 +257,7 @@ namespace detail virtual void context_destroyed() { - context_ = NULL; + context_ = 0; } friend std::ostream& operator<<( diff --git a/include/turtle/detail/singleton.hpp b/include/turtle/detail/singleton.hpp index fa2e5c0..d26799a 100644 --- a/include/turtle/detail/singleton.hpp +++ b/include/turtle/detail/singleton.hpp @@ -14,7 +14,7 @@ namespace mock { namespace detail { -template +template< typename Derived > class singleton { public: static Derived& inst() { static Derived the_inst; return the_inst; } @@ -30,7 +30,7 @@ protected: // Add a private ctor to the type to prevent misuse #define MOCK_SINGLETON_CONS( type ) \ private: \ -friend class ::mock::detail::singleton; \ +friend class mock::detail::singleton< type >; \ type() {} } // detail