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:
mat007 2012-07-22 07:02:21 +00:00
parent e56c9f586e
commit 0357fe1dda
7 changed files with 10 additions and 11 deletions

View file

@ -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() )

View file

@ -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;

View file

@ -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_ )

View file

@ -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() )

View file

@ -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 )
{}

View file

@ -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 );