aboutsummaryrefslogtreecommitdiff
path: root/paludis/resolver/qpn_s.cc
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/resolver/qpn_s.cc')
-rw-r--r--paludis/resolver/qpn_s.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/paludis/resolver/qpn_s.cc b/paludis/resolver/qpn_s.cc
index 2bb582037..3e49967c2 100644
--- a/paludis/resolver/qpn_s.cc
+++ b/paludis/resolver/qpn_s.cc
@@ -108,6 +108,18 @@ QPN_S::operator< (const QPN_S & other) const
}
}
+bool
+QPN_S::operator== (const QPN_S & other) const
+{
+ if (! (package() == other.package()))
+ return false;
+
+ if (slot_name_or_null())
+ return other.slot_name_or_null() && *slot_name_or_null() == *other.slot_name_or_null();
+ else
+ return ! other.slot_name_or_null();
+}
+
std::ostream &
paludis::resolver::operator<< (std::ostream & s, const QPN_S & q)
{