]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: use boost::make_counting_iterator()
authorKefu Chai <kchai@redhat.com>
Thu, 28 Feb 2019 03:26:46 +0000 (11:26 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 16 Mar 2019 07:29:24 +0000 (15:29 +0800)
no need to repeat the type of the iterator.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/osd.cc

index bc1d245dac5a3a17c2e87370bd48c37fe3459b40..3120b2652357c611068d362eab76c53284c6fd08 100644 (file)
@@ -1,5 +1,6 @@
 #include "osd.h"
 
+#include <boost/iterator/counting_iterator.hpp>
 #include <boost/range/join.hpp>
 #include <boost/smart_ptr/make_local_shared.hpp>
 
@@ -418,8 +419,8 @@ seastar::future<bufferlist> OSD::load_map_bl(epoch_t e)
 seastar::future<> OSD::store_maps(ceph::os::Transaction& t,
                                   epoch_t start, Ref<MOSDMap> m)
 {
-  return seastar::do_for_each(boost::counting_iterator<epoch_t>(start),
-                              boost::counting_iterator<epoch_t>(m->get_last() + 1),
+  return seastar::do_for_each(boost::make_counting_iterator(start),
+                              boost::make_counting_iterator(m->get_last() + 1),
                               [&t, m, this](epoch_t e) {
     if (auto p = m->maps.find(e); p != m->maps.end()) {
       auto o = std::make_unique<OSDMap>();