summaryrefslogtreecommitdiffstats
path: root/src/test/crush
diff options
context:
space:
mode:
authorKefu Chai <kchai@redhat.com>2018-05-15 17:56:39 +0200
committerKefu Chai <kchai@redhat.com>2018-05-17 07:56:49 +0200
commitf146c6c514b7f1ab8a2420edb5f7b64702bc9639 (patch)
treee94af3e7fc2b9411ba80c871445e08ee1aab0191 /src/test/crush
parentmds: use const_iterator for decode (diff)
downloadceph-f146c6c514b7f1ab8a2420edb5f7b64702bc9639.tar.xz
ceph-f146c6c514b7f1ab8a2420edb5f7b64702bc9639.zip
core: use const_iterator for decode
Signed-off-by: Kefu Chai <kchai@redhat.com>
Diffstat (limited to 'src/test/crush')
-rw-r--r--src/test/crush/CrushWrapper.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/crush/CrushWrapper.cc b/src/test/crush/CrushWrapper.cc
index ec240823b95..26112fc40b3 100644
--- a/src/test/crush/CrushWrapper.cc
+++ b/src/test/crush/CrushWrapper.cc
@@ -1041,7 +1041,7 @@ TEST(CrushWrapper, choose_args_compat) {
c.choose_args[caid] = arg_map;
bufferlist bl;
c.encode(bl, features|CEPH_FEATURE_CRUSH_CHOOSE_ARGS);
- bufferlist::iterator i(bl.begin());
+ auto i = bl.cbegin();
CrushWrapper c_new;
c_new.decode(i);
ASSERT_EQ(1u, c_new.choose_args.size());
@@ -1056,7 +1056,7 @@ TEST(CrushWrapper, choose_args_compat) {
bufferlist bl;
c.encode(bl, features);
c.choose_args.clear();
- bufferlist::iterator i(bl.begin());
+ auto i = bl.cbegin();
CrushWrapper c_new;
c_new.decode(i);
ASSERT_EQ(0u, c_new.choose_args.size());