From f31988b031453d7fdf7fe212f966554fa558af3e Mon Sep 17 00:00:00 2001 From: khizmax Date: Wed, 3 Aug 2016 12:45:39 +0300 Subject: [PATCH] Removed redundant functions --- cds/container/impl/iterable_kvlist.h | 2 +- cds/container/impl/iterable_list.h | 17 +---------------- cds/intrusive/impl/iterable_list.h | 17 +---------------- 3 files changed, 3 insertions(+), 33 deletions(-) diff --git a/cds/container/impl/iterable_kvlist.h b/cds/container/impl/iterable_kvlist.h index 19d2615a..2826d2e1 100644 --- a/cds/container/impl/iterable_kvlist.h +++ b/cds/container/impl/iterable_kvlist.h @@ -582,7 +582,7 @@ namespace cds { namespace container { If \p key is not found the function returns \p end(). */ template - iterator find_with( Q& key, Less pred ) const + iterator find_with( Q const& key, Less pred ) const { CDS_UNUSED( pred ); return base_class::find_with( key, less_wrapper()); diff --git a/cds/container/impl/iterable_list.h b/cds/container/impl/iterable_list.h index 83a02219..e51234ce 100644 --- a/cds/container/impl/iterable_list.h +++ b/cds/container/impl/iterable_list.h @@ -622,17 +622,10 @@ namespace cds { namespace container { If \p key is not found the function returns \p end(). */ template - iterator find( Q& key ) const - { - return find_iterator_at( head(), key, key_comparator()); - } - //@cond - template iterator find( Q const& key ) const { - return find_iterator_at( head(), key, key_comparator() ); + return find_iterator_at( head(), key, key_comparator()); } - //@endcond /// Finds \p key using \p pred predicate for searching /** @@ -664,19 +657,11 @@ namespace cds { namespace container { If \p key is not found the function returns \p end(). */ template - iterator find_with( Q& key, Less pred ) const - { - CDS_UNUSED( pred ); - return find_iterator_at( head(), key, cds::opt::details::make_comparator_from_less()); - } - //@cond - template iterator find_with( Q const& key, Less pred ) const { CDS_UNUSED( pred ); return find_iterator_at( head(), key, cds::opt::details::make_comparator_from_less()); } - //@endcond /// Finds \p key and return the item found /** \anchor cds_nonintrusive_MichaelList_hp_get diff --git a/cds/intrusive/impl/iterable_list.h b/cds/intrusive/impl/iterable_list.h index 169496df..ccc50be6 100644 --- a/cds/intrusive/impl/iterable_list.h +++ b/cds/intrusive/impl/iterable_list.h @@ -662,17 +662,10 @@ namespace cds { namespace intrusive { If \p key is not found the function returns \p end(). */ template - iterator find( Q& key ) const - { - return find_iterator_at( m_pHead, key, key_comparator()); - } - //@cond - template iterator find( Q const& key ) const { - return find_iterator_at( m_pHead, key, key_comparator() ); + return find_iterator_at( m_pHead, key, key_comparator()); } - //@endcond /// Finds the \p key using \p pred predicate for searching /** @@ -705,19 +698,11 @@ namespace cds { namespace intrusive { If \p key is not found the function returns \p end(). */ template - iterator find_with( Q& key, Less pred ) const - { - CDS_UNUSED( pred ); - return find_iterator_at( m_pHead, key, cds::opt::details::make_comparator_from_less()); - } - //@cond - template iterator find_with( Q const& key, Less pred ) const { CDS_UNUSED( pred ); return find_iterator_at( m_pHead, key, cds::opt::details::make_comparator_from_less()); } - //@endcond /// Checks whether the list contains \p key /** -- 2.34.1