Browse Source

Merge pull request #350 from ilsalvopss/candidate_compare

Candidate == operator compares also mNode and mService
Paul-Louis Ageneau 4 years ago
parent
commit
a936fed022
1 changed files with 3 additions and 1 deletions
  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 {
 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 {
 bool Candidate::operator!=(const Candidate &other) const {