Skip to content
Snippets Groups Projects
Commit 8ed32629 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

clang-tidy: replace std::bind with lambda

lambda is more efficient then bind
parent 35a50d27
No related branches found
No related tags found
1 merge request!172Clang tidy fixes merge
......@@ -148,7 +148,15 @@ public:
* CommonException if one of the added elements is not available in context of datatype where the set is used
*/
Derived & set ( SetComponentType data ) {
ext::set_symmetric_difference ( m_data.begin ( ), m_data.end ( ), data.begin ( ), data.end ( ), ext::make_callback_iterator ( std::bind ( & SetComponent::checkRemove, this, std::placeholders::_1 ) ), ext::make_callback_iterator ( std::bind ( & SetComponent::checkAdd, this, std::placeholders::_1 ) ) );
auto removeCheckLambda = [ this ] ( const auto & value ) {
this->checkRemove ( value );
};
auto addCheckLambda = [ this ] ( const auto & value ) {
this->checkAdd ( value );
};
ext::set_symmetric_difference ( m_data.begin ( ), m_data.end ( ), data.begin ( ), data.end ( ), ext::make_callback_iterator ( removeCheckLambda ), ext::make_callback_iterator ( addCheckLambda ) );
 
m_data = std::move ( data );
return static_cast < Derived & > ( * this );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment