From 26668d6f9bbd3f0fe627e8e4e646847472b2bc9a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 10 Jul 2015 13:29:54 -0400 Subject: [PATCH] os/CollectionIndex: use const ref for end Signed-off-by: Sage Weil --- src/os/CollectionIndex.h | 2 +- src/os/HashIndex.cc | 2 +- src/os/HashIndex.h | 2 +- src/os/LFNIndex.cc | 2 +- src/os/LFNIndex.h | 4 ++-- src/test/os/TestLFNIndex.cc | 6 +----- 6 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/os/CollectionIndex.h b/src/os/CollectionIndex.h index eeab2cb0a8e6c..2f832477b29f4 100644 --- a/src/os/CollectionIndex.h +++ b/src/os/CollectionIndex.h @@ -166,7 +166,7 @@ protected: /// List contents of collection by hash virtual int collection_list_partial( const ghobject_t &start, ///< [in] object at which to start - const ghobject_t end, ///< [in] list only objects < end + const ghobject_t &end, ///< [in] list only objects < end int max_count, ///< [in] return at most max_count objects snapid_t seq, ///< [in] list only objects with snap >= seq vector *ls, ///< [out] Listed objects diff --git a/src/os/HashIndex.cc b/src/os/HashIndex.cc index 1e0e1e41fbdae..d5494a90df7b3 100644 --- a/src/os/HashIndex.cc +++ b/src/os/HashIndex.cc @@ -326,7 +326,7 @@ int HashIndex::_collection_list(vector *ls) { } int HashIndex::_collection_list_partial(const ghobject_t &start, - const ghobject_t end, + const ghobject_t &end, int max_count, snapid_t seq, vector *ls, diff --git a/src/os/HashIndex.h b/src/os/HashIndex.h index afe2364748b18..b94cb50524808 100644 --- a/src/os/HashIndex.h +++ b/src/os/HashIndex.h @@ -193,7 +193,7 @@ protected: int _collection_list_partial( const ghobject_t &start, - ghobject_t end, + const ghobject_t &end, int max_count, snapid_t seq, vector *ls, diff --git a/src/os/LFNIndex.cc b/src/os/LFNIndex.cc index 7687a66af3274..f0f5affc02531 100644 --- a/src/os/LFNIndex.cc +++ b/src/os/LFNIndex.cc @@ -155,7 +155,7 @@ int LFNIndex::pre_hash_collection(uint32_t pg_num, uint64_t expected_num_objs) int LFNIndex::collection_list_partial(const ghobject_t &start, - const ghobject_t end, + const ghobject_t &end, int max_count, snapid_t seq, vector *ls, diff --git a/src/os/LFNIndex.h b/src/os/LFNIndex.h index 000e0ae342347..684d3ca08cc48 100644 --- a/src/os/LFNIndex.h +++ b/src/os/LFNIndex.h @@ -192,7 +192,7 @@ public: /// @see CollectionIndex int collection_list_partial( const ghobject_t &start, - const ghobject_t end, + const ghobject_t &end, int max_count, snapid_t seq, vector *ls, @@ -268,7 +268,7 @@ protected: /// @see CollectionIndex virtual int _collection_list_partial( const ghobject_t &start, - const ghobject_t end, + const ghobject_t &end, int max_count, snapid_t seq, vector *ls, diff --git a/src/test/os/TestLFNIndex.cc b/src/test/os/TestLFNIndex.cc index 7ed0866ffcaa8..49b592adb53ed 100644 --- a/src/test/os/TestLFNIndex.cc +++ b/src/test/os/TestLFNIndex.cc @@ -75,15 +75,11 @@ protected: int *exists ) { return 0; } - virtual int _collection_list( - vector *ls - ) { return 0; } - virtual int _collection_list_partial( const ghobject_t &start, + const ghobject_t &end, int min_count, int max_count, - snapid_t seq, vector *ls, ghobject_t *next ) { return 0; } -- 2.39.5