HP refactoring:
[libcds.git] / cds / container / impl / iterable_list.h
index 228e96ace45c6b492e2efd08e4718c7babe96f02..e32f89458561032a59ff9eba2769f2ba114443ab 100644 (file)
@@ -556,9 +556,7 @@ namespace cds { namespace container {
         template <typename Q>
         guarded_ptr extract( Q const& key )
         {
-            guarded_ptr gp;
-            extract_at( head(), gp.guard(), key, key_comparator() );
-            return gp;
+            return extract_at( head(), key, key_comparator() );
         }
 
         /// Extracts the item from the list with comparing functor \p pred
@@ -573,9 +571,7 @@ namespace cds { namespace container {
         guarded_ptr extract_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            guarded_ptr gp;
-            extract_at( head(), gp.guard(), key, typename maker::template less_wrapper<Less>::type() );
-            return gp;
+            return extract_at( head(), key, typename maker::template less_wrapper<Less>::type() );
         }
 
         /// Checks whether the list contains \p key
@@ -708,9 +704,7 @@ namespace cds { namespace container {
         template <typename Q>
         guarded_ptr get( Q const& key ) const
         {
-            guarded_ptr gp;
-            get_at( head(), gp.guard(), key, key_comparator() );
-            return gp;
+            return get_at( head(), key, key_comparator() );
         }
 
         /// Finds \p key and return the item found
@@ -726,9 +720,7 @@ namespace cds { namespace container {
         guarded_ptr get_with( Q const& key, Less pred ) const
         {
             CDS_UNUSED( pred );
-            guarded_ptr gp;
-            get_at( head(), gp.guard(), key, typename maker::template less_wrapper<Less>::type() );
-            return gp;
+            return get_at( head(), key, typename maker::template less_wrapper<Less>::type() );
         }
 
         /// Checks if the list is empty
@@ -852,9 +844,9 @@ namespace cds { namespace container {
         }
 
         template <typename Q, typename Compare>
-        bool extract_at( head_type& refHead, typename guarded_ptr::native_guard& guard, Q const& key, Compare cmp )
+        guarded_ptr extract_at( head_type& refHead, Q const& key, Compare cmp )
         {
-            return base_class::extract_at( refHead, guard, key, cmp );
+            return base_class::extract_at( refHead, key, cmp );
         }
 
         template <typename Q, typename Compare>
@@ -876,9 +868,9 @@ namespace cds { namespace container {
         }
 
         template <typename Q, typename Compare>
-        bool get_at( head_type const& refHead, typename guarded_ptr::native_guard& guard, Q const& key, Compare cmp ) const
+        guarded_ptr get_at( head_type const& refHead, Q const& key, Compare cmp ) const
         {
-            return base_class::get_at( refHead, guard, key, cmp );
+            return base_class::get_at( refHead, key, cmp );
         }
 
         //@endcond