From: Kefu Chai Date: Sat, 19 Dec 2020 11:38:49 +0000 (+0800) Subject: osd/osd_types: pass a const bufferlist to object_info_t::decode() X-Git-Tag: v16.1.0~146^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=047420cc8eacec3fc6074e5ca325f961afacc5bf;p=ceph.git osd/osd_types: pass a const bufferlist to object_info_t::decode() more constness, better readability. Signed-off-by: Kefu Chai --- diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index b6e1474b324e..a9694f139043 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -5881,7 +5881,7 @@ struct object_info_t { void encode(ceph::buffer::list& bl, uint64_t features) const; void decode(ceph::buffer::list::const_iterator& bl); - void decode(ceph::buffer::list& bl) { + void decode(const ceph::buffer::list& bl) { auto p = std::cbegin(bl); decode(p); }