diff --git a/src/c-wrapper/c-tools.h b/src/c-wrapper/c-tools.h index 750c57919..1197e201a 100644 --- a/src/c-wrapper/c-tools.h +++ b/src/c-wrapper/c-tools.h @@ -144,7 +144,7 @@ public: } template - static inline CType * getCBackPtr (const std::shared_ptr &object, CType *(*cTypeAllocator)()) { + static inline CType *getCBackPtr (const std::shared_ptr &object, CType *(*cTypeAllocator)()) { Variant v = object->getProperty("LinphonePrivate::Wrapper::cBackPtr"); void *value = v.getValue(); if (!value) { @@ -155,7 +155,7 @@ public: } template - static inline CType * getCBackPtr (const CppType *object, CType *(*cTypeAllocator)()) { + static inline CType *getCBackPtr (const CppType *object, CType *(*cTypeAllocator)()) { Variant v = object->getProperty("LinphonePrivate::Wrapper::cBackPtr"); void *value = v.getValue(); if (!value) { @@ -168,19 +168,19 @@ public: // --------------------------------------------------------------------------- template - static void * getUserData (const std::shared_ptr &cppPtr) { + static void *getUserData (const std::shared_ptr &cppPtr) { Variant v = cppPtr->getProperty("LinphonePrivate::Wrapper::userData"); return v.getValue(); } template - static void * getUserData (T *cppPtr) { + static void *getUserData (T *cppPtr) { Variant v = cppPtr->getProperty("LinphonePrivate::Wrapper::userData"); return v.getValue(); } template - static inline void setUserData (std::shared_ptr object, void *value) { + static inline void setUserData (const std::shared_ptr &object, void *value) { L_ASSERT(object); object->setProperty("LinphonePrivate::Wrapper::userData", value); } @@ -194,7 +194,7 @@ public: // --------------------------------------------------------------------------- template - static inline bctbx_list_t * getCListFromCppList (const std::list cppList) { + static inline bctbx_list_t *getCListFromCppList (const std::list cppList) { bctbx_list_t *result = nullptr; for (const auto &value : cppList) result = bctbx_list_append(result, value); @@ -202,7 +202,7 @@ public: } template - static inline bctbx_list_t * getCListOfStructPtrFromCppListOfCppObj (const std::list> cppList, CType *(*cTypeAllocator)()) { + static inline bctbx_list_t *getCListOfStructPtrFromCppListOfCppObj (const std::list> cppList, CType *(*cTypeAllocator)()) { bctbx_list_t *result = nullptr; for (const auto &value : cppList) result = bctbx_list_append(result, getCBackPtr(value, cTypeAllocator)); @@ -210,7 +210,7 @@ public: } template - static inline bctbx_list_t * getCListOfStructPtrFromCppListOfCppObj (const std::list cppList, CType *(*cTypeAllocator)()) { + static inline bctbx_list_t *getCListOfStructPtrFromCppListOfCppObj (const std::list cppList, CType *(*cTypeAllocator)()) { bctbx_list_t *result = nullptr; for (const auto &value : cppList) result = bctbx_list_append(result, getCBackPtr(value, cTypeAllocator)); diff --git a/src/chat/basic-chat-room.cpp b/src/chat/basic-chat-room.cpp index 0fe854161..c7eec4b58 100644 --- a/src/chat/basic-chat-room.cpp +++ b/src/chat/basic-chat-room.cpp @@ -65,11 +65,11 @@ list> BasicChatRoom::getParticipants () const { return l; } -void BasicChatRoom::removeParticipant (const shared_ptr participant) { +void BasicChatRoom::removeParticipant (const shared_ptr &participant) { lError() << "removeParticipant() is not allowed on a BasicChatRoom"; } -void BasicChatRoom::removeParticipants (const list> participants) { +void BasicChatRoom::removeParticipants (const list> &participants) { lError() << "removeParticipants() is not allowed on a BasicChatRoom"; } diff --git a/src/chat/basic-chat-room.h b/src/chat/basic-chat-room.h index 4f6ec7d50..1aced22f7 100644 --- a/src/chat/basic-chat-room.h +++ b/src/chat/basic-chat-room.h @@ -45,8 +45,8 @@ public: const std::string& getId () const; int getNbParticipants () const; std::list> getParticipants () const; - void removeParticipant (const std::shared_ptr participant); - void removeParticipants (const std::list> participants); + void removeParticipant (const std::shared_ptr &participant); + void removeParticipants (const std::list> &participants); private: L_DECLARE_PRIVATE(BasicChatRoom); @@ -56,4 +56,3 @@ private: LINPHONE_END_NAMESPACE #endif // ifndef _BASIC_CHAT_ROOM_H_ - diff --git a/src/chat/client-group-chat-room.cpp b/src/chat/client-group-chat-room.cpp index 282303219..8878bc7f2 100644 --- a/src/chat/client-group-chat-room.cpp +++ b/src/chat/client-group-chat-room.cpp @@ -71,11 +71,11 @@ list> ClientGroupChatRoom::getParticipants () const { return participants; } -void ClientGroupChatRoom::removeParticipant (const shared_ptr participant) { +void ClientGroupChatRoom::removeParticipant (const shared_ptr &participant) { // TODO } -void ClientGroupChatRoom::removeParticipants (const list> participants) { +void ClientGroupChatRoom::removeParticipants (const list> &participants) { // TODO } diff --git a/src/chat/client-group-chat-room.h b/src/chat/client-group-chat-room.h index 849af656e..04c4181e0 100644 --- a/src/chat/client-group-chat-room.h +++ b/src/chat/client-group-chat-room.h @@ -46,8 +46,8 @@ public: const std::string& getId () const; int getNbParticipants () const; std::list> getParticipants () const; - void removeParticipant (const std::shared_ptr participant); - void removeParticipants (const std::list> participants); + void removeParticipant (const std::shared_ptr &participant); + void removeParticipants (const std::list> &participants); private: L_DECLARE_PRIVATE(ClientGroupChatRoom); @@ -57,4 +57,3 @@ private: LINPHONE_END_NAMESPACE #endif // ifndef _CLIENT_GROUP_CHAT_ROOM_H_ - diff --git a/src/chat/real-time-text-chat-room.cpp b/src/chat/real-time-text-chat-room.cpp index 359912dae..8acb10ae6 100644 --- a/src/chat/real-time-text-chat-room.cpp +++ b/src/chat/real-time-text-chat-room.cpp @@ -173,11 +173,11 @@ list> RealTimeTextChatRoom::getParticipants () const { return l; } -void RealTimeTextChatRoom::removeParticipant (const shared_ptr participant) { +void RealTimeTextChatRoom::removeParticipant (const shared_ptr &participant) { lError() << "removeParticipant() is not allowed on a RealTimeTextChatRoom"; } -void RealTimeTextChatRoom::removeParticipants (const list> participants) { +void RealTimeTextChatRoom::removeParticipants (const list> &participants) { lError() << "removeParticipants() is not allowed on a RealTimeTextChatRoom"; } diff --git a/src/chat/real-time-text-chat-room.h b/src/chat/real-time-text-chat-room.h index a75f08d67..4c26673d8 100644 --- a/src/chat/real-time-text-chat-room.h +++ b/src/chat/real-time-text-chat-room.h @@ -49,8 +49,8 @@ public: const std::string& getId () const; int getNbParticipants () const; std::list> getParticipants () const; - void removeParticipant (const std::shared_ptr participant); - void removeParticipants (const std::list> participants); + void removeParticipant (const std::shared_ptr &participant); + void removeParticipants (const std::list> &participants); private: L_DECLARE_PRIVATE(RealTimeTextChatRoom); @@ -60,4 +60,3 @@ private: LINPHONE_END_NAMESPACE #endif // ifndef _REAL_TIME_TEXT_CHAT_ROOM_H_ - diff --git a/src/conference/conference-interface.h b/src/conference/conference-interface.h index 4cdcb7f32..a32040846 100644 --- a/src/conference/conference-interface.h +++ b/src/conference/conference-interface.h @@ -40,8 +40,8 @@ public: virtual const std::string& getId () const = 0; virtual int getNbParticipants () const = 0; virtual std::list> getParticipants () const = 0; - virtual void removeParticipant (const std::shared_ptr participant) = 0; - virtual void removeParticipants (const std::list> participants) = 0; + virtual void removeParticipant (const std::shared_ptr &participant) = 0; + virtual void removeParticipants (const std::list> &participants) = 0; }; LINPHONE_END_NAMESPACE diff --git a/src/conference/conference.cpp b/src/conference/conference.cpp index 47080b829..a6d679421 100644 --- a/src/conference/conference.cpp +++ b/src/conference/conference.cpp @@ -66,11 +66,11 @@ list> Conference::getParticipants () const { return participants; } -void Conference::removeParticipant (const shared_ptr participant) { +void Conference::removeParticipant (const shared_ptr &participant) { // TODO } -void Conference::removeParticipants (const list> participants) { +void Conference::removeParticipants (const list> &participants) { // TODO } diff --git a/src/conference/conference.h b/src/conference/conference.h index 8ad1350e5..f5746b556 100644 --- a/src/conference/conference.h +++ b/src/conference/conference.h @@ -56,8 +56,8 @@ public: virtual const std::string& getId () const; virtual int getNbParticipants () const; virtual std::list> getParticipants () const; - virtual void removeParticipant (const std::shared_ptr participant); - virtual void removeParticipants (const std::list> participants); + virtual void removeParticipant (const std::shared_ptr &participant); + virtual void removeParticipants (const std::list> &participants); private: /* CallSessionListener */ diff --git a/src/conference/local-conference.cpp b/src/conference/local-conference.cpp index 906d05afa..96ab857f6 100644 --- a/src/conference/local-conference.cpp +++ b/src/conference/local-conference.cpp @@ -68,7 +68,7 @@ list> LocalConference::getParticipants () const { return participants; } -void LocalConference::removeParticipant (const shared_ptr participant) { +void LocalConference::removeParticipant (const shared_ptr &participant) { for (const auto &p : participants) { if (participant->getAddress().equal(p->getAddress())) { participants.remove(p); @@ -77,7 +77,7 @@ void LocalConference::removeParticipant (const shared_ptr participa } } -void LocalConference::removeParticipants (const list> participants) { +void LocalConference::removeParticipants (const list> &participants) { for (const auto &p : participants) removeParticipant(p); } diff --git a/src/conference/local-conference.h b/src/conference/local-conference.h index 0b3c93ae6..18394c5b8 100644 --- a/src/conference/local-conference.h +++ b/src/conference/local-conference.h @@ -41,8 +41,8 @@ public: virtual const std::string& getId () const; virtual int getNbParticipants () const; virtual std::list> getParticipants () const; - virtual void removeParticipant (const std::shared_ptr participant); - virtual void removeParticipants (const std::list> participants); + virtual void removeParticipant (const std::shared_ptr &participant); + virtual void removeParticipants (const std::list> &participants); private: L_DISABLE_COPY(LocalConference);