mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Cleaned code
This commit is contained in:
parent
afffdb470a
commit
15285a22ec
3 changed files with 7 additions and 6 deletions
|
|
@ -100,11 +100,11 @@ namespace detail
|
||||||
}
|
}
|
||||||
|
|
||||||
template< typename Value >
|
template< typename Value >
|
||||||
void moves( BOOST_RV_REF( Value ) v )
|
void moves( BOOST_RV_REF(Value) v )
|
||||||
{
|
{
|
||||||
this->set(
|
this->set(
|
||||||
boost::bind(
|
boost::bind(
|
||||||
&boost::move< BOOST_RV_REF( Value ) >,
|
&boost::move< BOOST_RV_REF(Value) >,
|
||||||
boost::ref( store( boost::move( v ) ) ) ) );
|
boost::ref( store( boost::move( v ) ) ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -124,7 +124,7 @@ namespace detail
|
||||||
>::type
|
>::type
|
||||||
>::type value_type;
|
>::type value_type;
|
||||||
|
|
||||||
value_imp( BOOST_RV_REF( value_type ) t )
|
value_imp( BOOST_RV_REF(value_type) t )
|
||||||
: t_( boost::move( t ) )
|
: t_( boost::move( t ) )
|
||||||
{}
|
{}
|
||||||
value_imp( const T& t )
|
value_imp( const T& t )
|
||||||
|
|
@ -138,7 +138,7 @@ namespace detail
|
||||||
};
|
};
|
||||||
|
|
||||||
template< typename T >
|
template< typename T >
|
||||||
T& store( BOOST_RV_REF( T ) t )
|
T& store( BOOST_RV_REF(T) t )
|
||||||
{
|
{
|
||||||
v_.reset( new value_imp< T >( boost::move( t ) ) );
|
v_.reset( new value_imp< T >( boost::move( t ) ) );
|
||||||
return static_cast< value_imp< T >& >( *v_ ).t_;
|
return static_cast< value_imp< T >& >( *v_ ).t_;
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ namespace detail
|
||||||
template< typename F,
|
template< typename F,
|
||||||
BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, typename T) >
|
BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, typename T) >
|
||||||
class multi_matcher< F, void( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) ) >
|
class multi_matcher< F, void( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) ) >
|
||||||
: public matcher_base< void( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS,T) ) >
|
: public matcher_base< void( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) ) >
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
multi_matcher( const F& f )
|
multi_matcher( const F& f )
|
||||||
|
|
@ -102,7 +102,7 @@ namespace detail
|
||||||
virtual bool operator()(
|
virtual bool operator()(
|
||||||
BOOST_PP_ENUM_BINARY_PARAMS( MOCK_NUM_ARGS, T, a ) )
|
BOOST_PP_ENUM_BINARY_PARAMS( MOCK_NUM_ARGS, T, a ) )
|
||||||
{
|
{
|
||||||
return f_( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, a ) );
|
return f_( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, a) );
|
||||||
}
|
}
|
||||||
virtual void serialize( std::ostream& s ) const
|
virtual void serialize( std::ostream& s ) const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,7 @@ namespace detail
|
||||||
BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, c) );
|
BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, c) );
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MOCK_NUM_ARGS > 1
|
#if MOCK_NUM_ARGS > 1
|
||||||
template< typename Constraint >
|
template< typename Constraint >
|
||||||
wrapper with( const Constraint& c )
|
wrapper with( const Constraint& c )
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue