fix(Address): remove equal method

This commit is contained in:
Ronan Abhamon 2017-10-10 13:35:11 +02:00
parent 36b10967ec
commit e4dd048ca0
5 changed files with 4 additions and 9 deletions

View file

@ -65,7 +65,7 @@ Address &Address::operator= (const Address &src) {
}
bool Address::operator== (const Address &address) const {
return equal(address);
return asString() == address.asString();
}
bool Address::operator!= (const Address &address) const {
@ -251,10 +251,6 @@ string Address::asStringUriOnly () const {
return out;
}
bool Address::equal (const Address &address) const {
return asString() == address.asString();
}
bool Address::weakEqual (const Address &address) const {
return getUsername() == address.getUsername() &&
getDomain() == address.getDomain() &&

View file

@ -82,7 +82,6 @@ public:
std::string asString () const;
std::string asStringUriOnly () const;
bool equal (const Address &address) const;
bool weakEqual (const Address &address) const;
const std::string &getHeaderValue (const std::string &headerName) const;

View file

@ -193,7 +193,7 @@ bool Conference::isMe (const Address &addr) const {
cleanedMe.setPort(0);
Address cleanedAddr = addr;
cleanedAddr.setPort(0);
return cleanedAddr.equal(cleanedMe);
return cleanedAddr == cleanedMe;
}
LINPHONE_END_NAMESPACE

View file

@ -51,7 +51,7 @@ void LocalConference::addParticipant (const Address &addr, const CallSessionPara
void LocalConference::removeParticipant (const shared_ptr<const Participant> &participant) {
for (const auto &p : participants) {
if (participant->getAddress().equal(p->getAddress())) {
if (participant->getAddress() == p->getAddress()) {
participants.remove(p);
return;
}

View file

@ -53,7 +53,7 @@ void RemoteConference::addParticipant (const Address &addr, const CallSessionPar
void RemoteConference::removeParticipant (const shared_ptr<const Participant> &participant) {
for (const auto &p : participants) {
if (participant->getAddress().equal(p->getAddress())) {
if (participant->getAddress() == p->getAddress()) {
participants.remove(p);
return;
}