mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Remove some superflous typedefs and default impls
This commit is contained in:
parent
d9f9fce6fc
commit
476c1a7831
4 changed files with 5 additions and 34 deletions
|
|
@ -112,17 +112,9 @@ namespace detail
|
|||
, lock_( m )
|
||||
{}
|
||||
wrapper(const wrapper&) = delete;
|
||||
wrapper( wrapper&& x )
|
||||
: base_type( x )
|
||||
, lock_( std::move( x.lock_) )
|
||||
{}
|
||||
wrapper( wrapper&& x ) = default;
|
||||
wrapper& operator=(const wrapper&) = delete;
|
||||
wrapper& operator=( wrapper&& x )
|
||||
{
|
||||
static_cast< base_type& >( *this ) = x;
|
||||
lock_ = std::move( x.lock_ );
|
||||
return *this;
|
||||
}
|
||||
wrapper& operator=( wrapper&& x ) = default;
|
||||
wrapper& once()
|
||||
{
|
||||
this->e_->invoke( std::make_unique< detail::once >() );
|
||||
|
|
|
|||
|
|
@ -21,15 +21,6 @@ namespace detail
|
|||
BOOST_PP_ENUM_TRAILING_PARAMS(MOCK_NUM_ARGS, typename T) >
|
||||
class function< R ( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) ) >
|
||||
{
|
||||
public:
|
||||
typedef R result_type;
|
||||
|
||||
template< typename Args >
|
||||
struct sig
|
||||
{
|
||||
typedef R type;
|
||||
};
|
||||
|
||||
private:
|
||||
typedef function_impl<
|
||||
R ( BOOST_PP_ENUM_PARAMS(MOCK_NUM_ARGS, T) )
|
||||
|
|
|
|||
|
|
@ -48,19 +48,9 @@ namespace detail
|
|||
m_->unlock();
|
||||
}
|
||||
lock( const lock& ) = delete;
|
||||
lock( lock&& x )
|
||||
: m_( x.m_ )
|
||||
{
|
||||
// Explicit reset to avoid unlock in destructor
|
||||
x.m_.reset();
|
||||
}
|
||||
lock( lock&& x ) = default;
|
||||
lock& operator=( const lock& ) = delete;
|
||||
lock& operator=( lock&& x )
|
||||
{
|
||||
m_ = x.m_;
|
||||
x.m_.reset();
|
||||
return *this;
|
||||
}
|
||||
lock& operator=( lock&& x ) = default;
|
||||
|
||||
private:
|
||||
std::shared_ptr< mutex > m_;
|
||||
|
|
|
|||
|
|
@ -54,9 +54,7 @@ namespace detail
|
|||
}
|
||||
|
||||
private:
|
||||
typedef std::vector< void* > elements_type;
|
||||
|
||||
elements_type elements_;
|
||||
std::vector< void* > elements_;
|
||||
const std::shared_ptr< mutex > mutex_;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue