mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Refactoring to pass boost::optional by value instead of const ref
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@485 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
e56c9f586e
commit
0357fe1dda
7 changed files with 10 additions and 11 deletions
|
|
@ -27,7 +27,7 @@ namespace detail
|
|||
{}
|
||||
void update( parent& p,
|
||||
boost::unit_test::const_string instance,
|
||||
const boost::optional< type_name >& type,
|
||||
boost::optional< type_name > type,
|
||||
boost::unit_test::const_string name )
|
||||
{
|
||||
if( instance != "?." || name_.empty() )
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace detail
|
|||
|
||||
virtual void add( const void* p, verifiable& v,
|
||||
boost::unit_test::const_string instance,
|
||||
const boost::optional< type_name >& type,
|
||||
boost::optional< type_name > type,
|
||||
boost::unit_test::const_string name ) = 0;
|
||||
virtual void add( verifiable& v ) = 0;
|
||||
virtual void remove( verifiable& v ) = 0;
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ namespace mock
|
|||
|
||||
void configure( detail::context& c, const void* p,
|
||||
boost::unit_test::const_string instance,
|
||||
const boost::optional< detail::type_name >& type,
|
||||
boost::optional< detail::type_name > type,
|
||||
boost::unit_test::const_string name ) const
|
||||
{
|
||||
if( ! impl_->context_ )
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ namespace detail
|
|||
public:
|
||||
virtual void add( const void* /*p*/, detail::verifiable& v,
|
||||
boost::unit_test::const_string instance,
|
||||
const boost::optional< detail::type_name >& type,
|
||||
boost::optional< detail::type_name > type,
|
||||
boost::unit_test::const_string name )
|
||||
{
|
||||
if( children_.empty() )
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace detail
|
|||
parent()
|
||||
{}
|
||||
parent( boost::unit_test::const_string instance,
|
||||
const boost::optional< type_name >& type )
|
||||
boost::optional< type_name > type )
|
||||
: instance_( instance )
|
||||
, type_( type )
|
||||
{}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ namespace detail
|
|||
public:
|
||||
virtual void add( const void* p, verifiable& v,
|
||||
boost::unit_test::const_string instance,
|
||||
const boost::optional< type_name >& type,
|
||||
boost::optional< type_name > type,
|
||||
boost::unit_test::const_string name )
|
||||
{
|
||||
children_it it = children_.lower_bound( &v );
|
||||
|
|
@ -94,7 +94,7 @@ namespace detail
|
|||
parents_->erase( it_ );
|
||||
}
|
||||
void update( boost::unit_test::const_string instance,
|
||||
const boost::optional< type_name >& type,
|
||||
boost::optional< type_name > type,
|
||||
boost::unit_test::const_string name )
|
||||
{
|
||||
child_.update( it_->second.first, instance, type, name );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue