]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/onode-staged-tree: use const reference in test_fltree_onode_manager
authorYingxin Cheng <yingxin.cheng@intel.com>
Thu, 29 Apr 2021 02:13:31 +0000 (10:13 +0800)
committerYingxin Cheng <yingxin.cheng@intel.com>
Sat, 8 May 2021 02:04:46 +0000 (10:04 +0800)
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
src/test/crimson/seastore/onode_tree/test_fltree_onode_manager.cc

index 9c3b4f1832a19d9cf02dbf51af4476e7418b7a9d..c9fc0ae8d001b8dba05520237dfc5308bf9c86ae 100644 (file)
@@ -139,7 +139,7 @@ struct fltree_onode_manager_test_t
 
   template <typename F>
   void with_onodes_process(
-      iterator_t& start, iterator_t& end, F&& f) {
+      const iterator_t& start, const iterator_t& end, F&& f) {
     std::vector<ghobject_t> oids;
     std::vector<onode_item_t*> items;
     auto it = start;
@@ -156,7 +156,7 @@ struct fltree_onode_manager_test_t
 
   template <typename F>
   void with_onodes_write(
-      iterator_t& start, iterator_t& end, F&& f) {
+      const iterator_t& start, const iterator_t& end, F&& f) {
     with_onodes_process(start, end,
         [this, f=std::move(f)] (auto& t, auto& oids, auto& items) {
       auto onodes = manager->get_or_create_onodes(
@@ -172,7 +172,7 @@ struct fltree_onode_manager_test_t
   }
 
   void validate_onodes(
-      iterator_t& start, iterator_t& end) {
+      const iterator_t& start, const iterator_t& end) {
     with_onodes_process(start, end,
         [this] (auto& t, auto& oids, auto& items) {
       for (auto tup : boost::combine(oids, items)) {
@@ -186,7 +186,7 @@ struct fltree_onode_manager_test_t
   }
 
   void validate_erased(
-      iterator_t& start, iterator_t& end) {
+      const iterator_t& start, const iterator_t& end) {
     with_onodes_process(start, end,
         [this] (auto& t, auto& oids, auto& items) {
       for (auto& oid : oids) {