Skip to content

Commit

Permalink
add operator ==
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaoxi Chen <[email protected]>
  • Loading branch information
xiaoxichen committed Apr 18, 2024
1 parent 251ae9e commit 476fa06
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/include/homeobject/homeobject.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit 476fa06

Please sign in to comment.