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 <tchaikov@gmail.com>
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;
};