From 96f5d1959a379881bebfb4b54a0238351a87e534 Mon Sep 17 00:00:00 2001 From: mat007 Date: Sun, 1 Mar 2015 11:28:33 +0000 Subject: [PATCH] Cleanup git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@768 860be788-9bd5-4423-9f1e-828f051e677b --- turtle/detail/function_impl_template.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/turtle/detail/function_impl_template.hpp b/turtle/detail/function_impl_template.hpp index d58d128..92a4724 100644 --- a/turtle/detail/function_impl_template.hpp +++ b/turtle/detail/function_impl_template.hpp @@ -38,9 +38,6 @@ namespace detail { public: typedef safe_error< R, MOCK_ERROR_POLICY< R > > error_type; - typedef expectation< - R ( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) ) - > expectation_type; public: function_impl() @@ -90,11 +87,14 @@ namespace detail } private: - template< typename T > - struct wrapper : wrapper_base< T, expectation_type > + typedef expectation< + R( BOOST_PP_ENUM_PARAMS( MOCK_NUM_ARGS, T ) ) + > expectation_type; + + struct wrapper : wrapper_base< R, expectation_type > { wrapper( const boost::shared_ptr< mutex >& m, expectation_type& e ) - : wrapper_base< T, expectation_type >( e ) + : wrapper_base< R, expectation_type >( e ) , lock_( m ) {} @@ -178,21 +178,21 @@ namespace detail }; public: - typedef wrapper< R > wrapper_type; + typedef wrapper wrapper_type; - wrapper_type expect( const char* file, int line ) + wrapper expect( const char* file, int line ) { lock _( mutex_ ); expectations_.push_back( expectation_type( file, line ) ); valid_ = true; - return wrapper_type( mutex_, expectations_.back() ); + return wrapper( mutex_, expectations_.back() ); } - wrapper_type expect() + wrapper expect() { lock _( mutex_ ); expectations_.push_back( expectation_type() ); valid_ = true; - return wrapper_type( mutex_, expectations_.back() ); + return wrapper( mutex_, expectations_.back() ); } R operator()(