From 476fa06a4c4a44810958ca1901e3bf4c5177bdfb Mon Sep 17 00:00:00 2001 From: Xiaoxi Chen Date: Thu, 18 Apr 2024 00:36:08 -0700 Subject: [PATCH] add operator == Signed-off-by: Xiaoxi Chen --- src/include/homeobject/homeobject.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/include/homeobject/homeobject.hpp b/src/include/homeobject/homeobject.hpp index 4c3d5f7d..7d98f43b 100644 --- a/src/include/homeobject/homeobject.hpp +++ b/src/include/homeobject/homeobject.hpp @@ -16,6 +16,7 @@ class ShardManager; ENUM(DevType, uint8_t, AUTO_DETECT = 1, HDD, NVME, UNSUPPORTED); struct device_info_t { explicit device_info_t(std::string name, DevType dtype = DevType::AUTO_DETECT) : path{std::filesystem::canonical(name)}, type{dtype} {} + bool operator ==(device_info_t const& rhs) const { return path == rhs.path && type == rhs.type; } std::filesystem::path path; DevType type; };