*/
iterator begin()
{
- return iterator(m_pHead.load(memory_model::memory_order_relaxed) );
+ return iterator(m_pHead.load(memory_model::memory_order_relaxed));
}
/// Returns an iterator that addresses the location succeeding the last element in a list
/// Returns a forward const iterator addressing the first element in a list
const_iterator begin() const
{
- return const_iterator(m_pHead.load(memory_model::memory_order_relaxed) );
+ return const_iterator(m_pHead.load(memory_model::memory_order_relaxed));
}
/// Returns a forward const iterator addressing the first element in a list
const_iterator cbegin() const
{
- return const_iterator(m_pHead.load(memory_model::memory_order_relaxed) );
+ return const_iterator(m_pHead.load(memory_model::memory_order_relaxed));
}
/// Returns an const iterator that addresses the location succeeding the last element in a list
template <typename Q>
value_type * contains( Q const& key )
{
- return find_at( m_pHead, key, key_comparator() );
+ return find_at( m_pHead, key, key_comparator());
}
//@cond
template <typename Q>
*/
void clear()
{
- clear( disposer() );
+ clear( disposer());
}
/// Checks if the list is empty
// Hack: convert node_type to value_type.
// In principle, auxiliary node can be non-reducible to value_type
// We assume that comparator can correctly distinguish aux and regular node.
- return insert_at( refHead, *node_traits::to_value_ptr( pNode ) );
+ return insert_at( refHead, *node_traits::to_value_ptr( pNode ));
}
bool insert_at( atomic_node_ptr& refHead, value_type& val )
return false;
}
- if ( link_node( node_traits::to_node_ptr( val ), pos ) ) {
+ if ( link_node( node_traits::to_node_ptr( val ), pos )) {
++m_ItemCounter;
m_Stat.onInsertSuccess();
return true;
position pos;
while ( true ) {
- if ( search( refHead, val, key_comparator(), pos ) ) {
- assert( key_comparator()( val, *node_traits::to_value_ptr( *pos.pCur ) ) == 0 );
+ if ( search( refHead, val, key_comparator(), pos )) {
+ assert( key_comparator()( val, *node_traits::to_value_ptr( *pos.pCur )) == 0 );
func( false, *node_traits::to_value_ptr( *pos.pCur ) , val );
m_Stat.onUpdateExisting();
return std::make_pair( end(), false );
}
- if ( link_node( node_traits::to_node_ptr( val ), pos ) ) {
+ if ( link_node( node_traits::to_node_ptr( val ), pos )) {
++m_ItemCounter;
func( true, val , val );
m_Stat.onUpdateNew();
{
position pos;
- if ( search( refHead, val, cmp, pos ) ) {
+ if ( search( refHead, val, cmp, pos )) {
assert( pos.pCur != nullptr );
f( *node_traits::to_value_ptr( *pos.pCur ), val );
m_Stat.onFindSuccess();
value_type * find_at( atomic_node_ptr& refHead, Q const& val, Compare cmp )
{
iterator it = find_at_( refHead, val, cmp );
- if ( it != end() ) {
+ if ( it != end()) {
m_Stat.onFindSuccess();
return &*it;
}
{
position pos;
- if ( search( refHead, val, cmp, pos ) ) {
+ if ( search( refHead, val, cmp, pos )) {
assert( pos.pCur != nullptr );
m_Stat.onFindSuccess();
return iterator( pos.pCur );