From 047420cc8eacec3fc6074e5ca325f961afacc5bf Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 19 Dec 2020 19:38:49 +0800 Subject: [PATCH] osd/osd_types: pass a const bufferlist to object_info_t::decode() more constness, better readability. Signed-off-by: Kefu Chai --- src/osd/osd_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index b6e1474b324ef..a9694f1390439 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); } -- 2.39.5