From: Kefu Chai Date: Fri, 20 Jun 2025 07:56:26 +0000 (+0800) Subject: osd/ECExtentCache: convert LRU::Key from class to struct X-Git-Tag: testing/wip-hyelloji-testing-20250624.114937~3^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c9da5b8464601ae2d368175c4f0d43f04371b397;p=ceph-ci.git osd/ECExtentCache: convert LRU::Key from class to struct Change Key from a class with public members and constructor to a plain struct. Since Key only holds data with no special initialization logic, a struct with aggregate initialization is more appropriate and simpler. This removes the user-declared constructor and relies on the compiler's default aggregate initialization from initializer lists. Signed-off-by: Kefu Chai --- diff --git a/src/osd/ECExtentCache.h b/src/osd/ECExtentCache.h index 0198cb331cd..7945c507bf2 100644 --- a/src/osd/ECExtentCache.h +++ b/src/osd/ECExtentCache.h @@ -104,13 +104,9 @@ class ECExtentCache { class LRU { public: - class Key { - public: + struct Key { uint64_t offset; hobject_t oid; - - Key(uint64_t offset, const hobject_t &oid) : offset(offset), oid(oid) {}; - bool operator==(const Key&) const = default; };