diff options
author | Kefu Chai <kchai@redhat.com> | 2018-05-15 17:56:39 +0200 |
---|---|---|
committer | Kefu Chai <kchai@redhat.com> | 2018-05-17 07:56:49 +0200 |
commit | f146c6c514b7f1ab8a2420edb5f7b64702bc9639 (patch) | |
tree | e94af3e7fc2b9411ba80c871445e08ee1aab0191 /src/test/crush | |
parent | mds: use const_iterator for decode (diff) | |
download | ceph-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.cc | 4 |
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()); |