Explorar o código

Merge pull request #350 from ilsalvopss/candidate_compare

Candidate == operator compares also mNode and mService
Paul-Louis Ageneau %!s(int64=4) %!d(string=hai) anos
pai
achega
a936fed022
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/candidate.cpp

+ 3 - 1
src/candidate.cpp

@@ -220,7 +220,9 @@ Candidate::operator string() const {
 }
 
 bool Candidate::operator==(const Candidate &other) const {
-	return mFoundation == other.mFoundation;
+	return (mFoundation == other.mFoundation &&
+	        mService == other.mService &&
+	        mNode == other.mNode);
 }
 
 bool Candidate::operator!=(const Candidate &other) const {