From 7f62b656f3cf2a0e181156e6e3e4f6482db155f6 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 28 Feb 2019 11:26:46 +0800 Subject: [PATCH] crimson/osd: use boost::make_counting_iterator() no need to repeat the type of the iterator. Signed-off-by: Kefu Chai --- src/crimson/osd/osd.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/crimson/osd/osd.cc b/src/crimson/osd/osd.cc index bc1d245dac5..3120b265235 100644 --- a/src/crimson/osd/osd.cc +++ b/src/crimson/osd/osd.cc @@ -1,5 +1,6 @@ #include "osd.h" +#include #include #include @@ -418,8 +419,8 @@ seastar::future OSD::load_map_bl(epoch_t e) seastar::future<> OSD::store_maps(ceph::os::Transaction& t, epoch_t start, Ref m) { - return seastar::do_for_each(boost::counting_iterator(start), - boost::counting_iterator(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(); -- 2.39.5