Commit b0873806 authored by Tristan Matthews's avatar Tristan Matthews

client: pass by value, not const &, for primitives

Refs #55019

Change-Id: If199ce7c2325ea959c3eddb6a9958b87fb24ca7c
parent 1d57e050
......@@ -58,7 +58,7 @@ void PresenceManager::registerEvHandlers(struct sflph_pres_ev_handlers* evHandle
* Un/subscribe to buddySipUri for an accountID
*/
void
PresenceManager::subscribeBuddy(const std::string& accountID, const std::string& uri, const bool& flag)
PresenceManager::subscribeBuddy(const std::string& accountID, const std::string& uri, bool flag)
{
const auto sipaccount = Manager::instance().getAccount<SIPAccount>(accountID);
......@@ -81,7 +81,7 @@ PresenceManager::subscribeBuddy(const std::string& accountID, const std::string&
* Notify for IP2IP account and publish for PBX account
*/
void
PresenceManager::publish(const std::string& accountID, const bool& status, const std::string& note)
PresenceManager::publish(const std::string& accountID, bool status, const std::string& note)
{
const auto sipaccount = Manager::instance().getAccount<SIPAccount>(accountID);
......@@ -103,7 +103,7 @@ PresenceManager::publish(const std::string& accountID, const bool& status, const
* Accept or not a PresSubServer request for IP2IP account
*/
void
PresenceManager::answerServerRequest(const std::string& uri, const bool& flag)
PresenceManager::answerServerRequest(const std::string& uri, bool flag)
{
const auto account = Manager::instance().getIP2IPAccount();
const auto sipaccount = static_cast<SIPAccount *>(account.get());
......@@ -191,7 +191,7 @@ void PresenceManager::serverError(const std::string& accountID, const std::strin
}
void PresenceManager::newBuddyNotification(const std::string& accountID, const std::string& buddyUri,
const bool& status, const std::string& lineStatus)
bool status, const std::string& lineStatus)
{
if (evHandlers_.on_new_buddy_notification) {
evHandlers_.on_new_buddy_notification(accountID, buddyUri, status, lineStatus);
......@@ -199,7 +199,7 @@ void PresenceManager::newBuddyNotification(const std::string& accountID, const s
}
void PresenceManager::subscriptionStateChanged(const std::string& accountID, const std::string& buddyUri,
const bool& state)
bool state)
{
if (evHandlers_.on_subscription_state_change) {
evHandlers_.on_subscription_state_change(accountID, buddyUri, state);
......
......@@ -48,9 +48,9 @@ class PresenceManager
// Methods
public:
/* Presence subscription/Notification. */
void publish(const std::string& accountID, const bool& status, const std::string& note);
void answerServerRequest(const std::string& uri, const bool& flag);
void subscribeBuddy(const std::string& accountID, const std::string& uri, const bool& flag);
void publish(const std::string& accountID, bool status, const std::string& note);
void answerServerRequest(const std::string& uri, bool flag);
void subscribeBuddy(const std::string& accountID, const std::string& uri, bool flag);
std::vector<std::map<std::string, std::string> > getSubscriptions(const std::string& accountID);
void setSubscriptions(const std::string& accountID, const std::vector<std::string>& uris);
......@@ -59,9 +59,8 @@ class PresenceManager
void newServerSubscriptionRequest(const std::string& remote);
void serverError(const std::string& accountID, const std::string& error, const std::string& msg);
void newBuddyNotification(const std::string& accountID, const std::string& buddyUri,
const bool& status, const std::string& lineStatus);
void subscriptionStateChanged(const std::string& accountID, const std::string& buddyUri,
const bool& state);
bool status, const std::string& lineStatus);
void subscriptionStateChanged(const std::string& accountID, const std::string& buddyUri, bool state);
private:
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment