CPPUNIT_CHECK( pGet->nKey == a[i] );
CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
- CPPUNIT_ASSERT( l.extract( ep, a[i] ));
+ ep = l.extract( a[i] );
+ CPPUNIT_ASSERT( ep );
CPPUNIT_ASSERT( !ep.empty() );
CPPUNIT_CHECK( ep->nKey == a[i] );
CPPUNIT_CHECK( (*ep).nVal == a[i] * 2 );
{
rcu_lock lock;
CPPUNIT_CHECK( l.get( a[i] ) == nullptr );
- CPPUNIT_CHECK( !l.extract( ep, a[i] ));
+ CPPUNIT_CHECK( !l.extract( a[i] ));
CPPUNIT_CHECK( ep.empty() );
}
}
{
rcu_lock lock;
CPPUNIT_CHECK( l.get( a[0] ) == nullptr );
- CPPUNIT_CHECK( !l.extract( ep, a[0] ) );
+ ep = l.extract( a[0] );
+ CPPUNIT_CHECK( !ep );
CPPUNIT_CHECK( ep.empty() );
}
// Apply retired pointer
CPPUNIT_CHECK( pGet->nKey == a[i] );
CPPUNIT_CHECK( pGet->nVal == a[i] * 2 );
- CPPUNIT_ASSERT( l.extract_with( ep, itm, other_less() ));
+ ep = l.extract_with( itm, other_less() );
+ CPPUNIT_ASSERT( ep );
CPPUNIT_ASSERT( !ep.empty() );
CPPUNIT_CHECK( ep->nKey == a[i] );
CPPUNIT_CHECK( ep->nVal == a[i] * 2 );
{
rcu_lock lock;
CPPUNIT_CHECK( l.get_with( itm, other_less() ) == nullptr );
- CPPUNIT_CHECK( !l.extract_with( ep, itm, other_less() ));
+ ep = l.extract_with( itm, other_less() );
+ CPPUNIT_CHECK( !ep );
CPPUNIT_CHECK( ep.empty() );
}
}
{
rcu_lock lock;
CPPUNIT_CHECK( l.get_with( other_item( 0 ), other_less() ) == nullptr );
- CPPUNIT_CHECK( !l.extract_with( ep, other_item(0), other_less() ));
+ CPPUNIT_CHECK( !l.extract_with( other_item(0), other_less() ));
CPPUNIT_CHECK( ep.empty() );
}
// Apply retired pointer