From c55d6b67ef88bc2ff3c9cbfccdc9a6a44304b7dd Mon Sep 17 00:00:00 2001 From: Sara Date: Thu, 2 May 2024 15:05:28 +0200 Subject: [PATCH] chore: updated operator formatting --- src/planner.hpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/planner.hpp b/src/planner.hpp index fee995c..23fe61e 100644 --- a/src/planner.hpp +++ b/src/planner.hpp @@ -88,22 +88,28 @@ struct PlannerNodeHasher { } }; -static _FORCE_INLINE_ bool operator==(PlannerNode const &lhs, PlannerNode const &rhs) { +static _FORCE_INLINE_ +bool operator==(PlannerNode const &lhs, PlannerNode const &rhs) { return PlannerNodeHasher::hash(lhs) == PlannerNodeHasher::hash(rhs); } -static _FORCE_INLINE_ bool operator!=(PlannerNode const &lhs, PlannerNode const &rhs) { +static _FORCE_INLINE_ +bool operator!=(PlannerNode const &lhs, PlannerNode const &rhs) { return !(lhs == rhs); } -static _FORCE_INLINE_ bool operator<(PlannerNode const &lhs, PlannerNode const &rhs) { +static _FORCE_INLINE_ +bool operator<(PlannerNode const &lhs, PlannerNode const &rhs) { return lhs.open_requirements.size() < rhs.open_requirements.size(); } -static _FORCE_INLINE_ bool operator>=(PlannerNode const &lhs, PlannerNode const &rhs) { +static _FORCE_INLINE_ +bool operator>=(PlannerNode const &lhs, PlannerNode const &rhs) { return !(lhs < rhs); } -static _FORCE_INLINE_ bool operator>(PlannerNode const &lhs, PlannerNode const &rhs) { +static _FORCE_INLINE_ +bool operator>(PlannerNode const &lhs, PlannerNode const &rhs) { return lhs.open_requirements.size() > rhs.open_requirements.size(); } -static _FORCE_INLINE_ bool operator<=(PlannerNode const &lhs, PlannerNode const &rhs) { +static _FORCE_INLINE_ +bool operator<=(PlannerNode const &lhs, PlannerNode const &rhs) { return !(lhs > rhs); } }