From af1a903c0925024ab444fbfe52c47325e0710430 Mon Sep 17 00:00:00 2001 From: Klaus Kaempf Date: Wed, 8 Feb 2006 21:51:24 +0000 Subject: [PATCH] add compare operators so we can use it as a map key --- zypp/NVRAD.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/zypp/NVRAD.h b/zypp/NVRAD.h index 275ee85..41d544e 100644 --- a/zypp/NVRAD.h +++ b/zypp/NVRAD.h @@ -63,6 +63,25 @@ namespace zypp NVRAD( Resolvable::constPtr res_r ); }; /////////////////////////////////////////////////////////////////// + inline bool operator<( const NVRAD & lhs, const NVRAD & rhs ) + { if (lhs.name >= rhs.name + && lhs.edition >= rhs.edition + && lhs.arch == rhs.arch) + { + return false; + } + return true; + } + + inline bool operator==( const NVRAD & lhs, const NVRAD & rhs ) + { if (lhs.name == rhs.name + && lhs.edition == rhs.edition + && lhs.arch == rhs.arch) + { + return true; + } + return false; + } ///////////////////////////////////////////////////////////////// } // namespace zypp -- 2.7.4