From 8c6089cbcbe9282c669a1be7486b0f73483ac827 Mon Sep 17 00:00:00 2001 From: Tristan Matthews <tristan.matthews@savoirfairelinux.com> Date: Tue, 17 Sep 2013 14:33:27 -0400 Subject: [PATCH] * #30216: daemon: fix use of "auto" keyword --- daemon/src/client/android/presencemanager.cpp | 5 ++--- daemon/src/client/dbus/presencemanager.cpp | 5 ++--- daemon/src/conference.cpp | 2 +- daemon/src/sip/sipaccount.cpp | 4 ++-- daemon/src/sip/sippresence.h | 2 +- 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/daemon/src/client/android/presencemanager.cpp b/daemon/src/client/android/presencemanager.cpp index ee9c30607b..de3a047903 100644 --- a/daemon/src/client/android/presencemanager.cpp +++ b/daemon/src/client/android/presencemanager.cpp @@ -127,9 +127,8 @@ void PresenceManager::setSubscriptions(const std::string& accountID, const std::vector<std::string>& uris) { SIPAccount *sipaccount = Manager::instance().getSipAccount(accountID); - for (auto u:uris) { - sipaccount->getPresence()->subscribeClient(u,true); - } + for (const auto &u : uris) + sipaccount->getPresence()->subscribeClient(u, true); } diff --git a/daemon/src/client/dbus/presencemanager.cpp b/daemon/src/client/dbus/presencemanager.cpp index de6c17aefb..a0219dc24b 100644 --- a/daemon/src/client/dbus/presencemanager.cpp +++ b/daemon/src/client/dbus/presencemanager.cpp @@ -128,7 +128,6 @@ void PresenceManager::setSubscriptions(const std::string& accountID, const std::vector<std::string>& uris) { SIPAccount *sipaccount = Manager::instance().getSipAccount(accountID); - for (auto u:uris) { + for (const auto &u : uris) sipaccount->getPresence()->subscribeClient(u,true); - } -} \ No newline at end of file +} diff --git a/daemon/src/conference.cpp b/daemon/src/conference.cpp index 57ff553ac3..8fc3432b78 100644 --- a/daemon/src/conference.cpp +++ b/daemon/src/conference.cpp @@ -59,7 +59,7 @@ Conference::Conference() Conference::~Conference() { - for (auto participant_id : participants_) + for (const auto &participant_id : participants_) remove(participant_id); } diff --git a/daemon/src/sip/sipaccount.cpp b/daemon/src/sip/sipaccount.cpp index fcf77df4e2..3c6d72e5f7 100644 --- a/daemon/src/sip/sipaccount.cpp +++ b/daemon/src/sip/sipaccount.cpp @@ -417,7 +417,7 @@ void SIPAccount::unserialize(const Conf::YamlNode &mapNode) } else { vector<map<string, string> > videoCodecDetails; - for (auto it : *seq) { + for (const auto &it : *seq) { MappingNode *codec = static_cast<MappingNode *>(it); map<string, string> codecMap; codec->getValue(VIDEO_CODEC_NAME, &codecMap[VIDEO_CODEC_NAME]); @@ -486,7 +486,7 @@ void SIPAccount::unserialize(const Conf::YamlNode &mapNode) SequenceNode *credSeq = static_cast<SequenceNode *>(credNode); Sequence *seq = credSeq->getSequence(); - for (auto it : *seq) { + for (const auto &it : *seq) { MappingNode *cred = static_cast<MappingNode *>(it); std::string user; std::string pass; diff --git a/daemon/src/sip/sippresence.h b/daemon/src/sip/sippresence.h index dffb2f8c4e..7d2e0e9f7c 100644 --- a/daemon/src/sip/sippresence.h +++ b/daemon/src/sip/sippresence.h @@ -197,7 +197,7 @@ class SIPPresence { return enabled_; } - const std::list< PresSubClient *> getClientSubscriptions() { + std::list< PresSubClient *> getClientSubscriptions() { return pres_sub_client_list_; } -- GitLab