From 0102ef79fc9506cdd37e2c074bfa2c1ad047dab6 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Thu, 14 Sep 2017 14:52:22 +0200 Subject: [PATCH] feaf(core): remove useless std... --- src/c-wrapper/api/c-call-params.cpp | 15 ++++++++------- src/call/call.cpp | 8 ++++---- src/chat/client-group-chat-room.cpp | 6 +++--- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/c-wrapper/api/c-call-params.cpp b/src/c-wrapper/api/c-call-params.cpp index f20de1e19..3b4d06c7f 100644 --- a/src/c-wrapper/api/c-call-params.cpp +++ b/src/c-wrapper/api/c-call-params.cpp @@ -25,15 +25,16 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "conference/params/call-session-params-p.h" #include "conference/params/media-session-params-p.h" - #define GET_CALL_CPP_PTR(obj) L_GET_CPP_PTR_FROM_C_STRUCT(obj, CallSessionParams, CallParams) #define GET_CALL_CPP_PRIVATE_PTR(obj) L_GET_PRIVATE_FROM_C_STRUCT(obj, CallSessionParams, CallParams) #define GET_MEDIA_CPP_PTR(obj) L_GET_CPP_PTR_FROM_C_STRUCT(obj, MediaSessionParams, CallParams) #define GET_MEDIA_CPP_PRIVATE_PTR(obj) L_GET_PRIVATE_FROM_C_STRUCT(obj, MediaSessionParams, CallParams) - L_DECLARE_C_CLONABLE_STRUCT_IMPL(MediaSessionParams, CallParams, call_params) +// ============================================================================= + +using namespace std; /******************************************************************************* * Internal functions * @@ -149,17 +150,17 @@ void linphone_call_params_enable_video(LinphoneCallParams *params, bool_t enable } const char *linphone_call_params_get_custom_header(const LinphoneCallParams *params, const char *header_name) { - std::string value = GET_MEDIA_CPP_PTR(params)->getCustomHeader(header_name); + string value = GET_MEDIA_CPP_PTR(params)->getCustomHeader(header_name); return value.empty() ? nullptr : value.c_str(); } const char * linphone_call_params_get_custom_sdp_attribute(const LinphoneCallParams *params, const char *attribute_name) { - std::string value = GET_MEDIA_CPP_PTR(params)->getCustomSdpAttribute(attribute_name); + string value = GET_MEDIA_CPP_PTR(params)->getCustomSdpAttribute(attribute_name); return value.empty() ? nullptr : value.c_str(); } const char * linphone_call_params_get_custom_sdp_media_attribute(const LinphoneCallParams *params, LinphoneStreamType type, const char *attribute_name) { - std::string value = GET_MEDIA_CPP_PTR(params)->getCustomSdpMediaAttribute(type, attribute_name); + string value = GET_MEDIA_CPP_PTR(params)->getCustomSdpMediaAttribute(type, attribute_name); return value.empty() ? nullptr : value.c_str(); } @@ -197,7 +198,7 @@ const LinphoneVideoDefinition * linphone_call_params_get_received_video_definiti } const char *linphone_call_params_get_record_file(const LinphoneCallParams *params) { - const std::string &value = GET_MEDIA_CPP_PTR(params)->getRecordFilePath(); + const string &value = GET_MEDIA_CPP_PTR(params)->getRecordFilePath(); return value.empty() ? nullptr : value.c_str(); } @@ -227,7 +228,7 @@ const LinphoneVideoDefinition * linphone_call_params_get_sent_video_definition(c } const char *linphone_call_params_get_session_name(const LinphoneCallParams *params) { - const std::string &value = GET_MEDIA_CPP_PTR(params)->getSessionName(); + const string &value = GET_MEDIA_CPP_PTR(params)->getSessionName(); return value.empty() ? nullptr : value.c_str(); } diff --git a/src/call/call.cpp b/src/call/call.cpp index d8ee56d40..678468ea4 100644 --- a/src/call/call.cpp +++ b/src/call/call.cpp @@ -137,7 +137,7 @@ void CallPrivate::onCallSetTerminated () { } } -void CallPrivate::onCallStateChanged (LinphoneCallState state, const std::string &message) { +void CallPrivate::onCallStateChanged (LinphoneCallState state, const string &message) { if (lcall) linphone_call_notify_state_changed(lcall, state, message.c_str()); } @@ -152,7 +152,7 @@ void CallPrivate::onIncomingCallToBeAdded () { linphone_core_add_call(core, lcall); } -void CallPrivate::onEncryptionChanged (bool activated, const std::string &authToken) { +void CallPrivate::onEncryptionChanged (bool activated, const string &authToken) { if (lcall) linphone_call_notify_encryption_changed(lcall, activated, authToken.empty() ? nullptr : authToken.c_str()); } @@ -255,12 +255,12 @@ void Call::stopRecording () { static_cast(d->getActiveSession().get())->stopRecording(); } -LinphoneStatus Call::takePreviewSnapshot (const std::string& file) { +LinphoneStatus Call::takePreviewSnapshot (const string& file) { L_D(Call); return static_cast(d->getActiveSession().get())->takePreviewSnapshot(file); } -LinphoneStatus Call::takeVideoSnapshot (const std::string& file) { +LinphoneStatus Call::takeVideoSnapshot (const string& file) { L_D(Call); return static_cast(d->getActiveSession().get())->takeVideoSnapshot(file); } diff --git a/src/chat/client-group-chat-room.cpp b/src/chat/client-group-chat-room.cpp index 2181a5b0e..282303219 100644 --- a/src/chat/client-group-chat-room.cpp +++ b/src/chat/client-group-chat-room.cpp @@ -20,17 +20,17 @@ #include "conference/participant-p.h" #include "logger/logger.h" +// ============================================================================= + using namespace std; LINPHONE_BEGIN_NAMESPACE -// ============================================================================= - ClientGroupChatRoomPrivate::ClientGroupChatRoomPrivate (LinphoneCore *core) : ChatRoomPrivate(core) {} // ============================================================================= -ClientGroupChatRoom::ClientGroupChatRoom (LinphoneCore *core, const Address &me, std::list
&addresses) +ClientGroupChatRoom::ClientGroupChatRoom (LinphoneCore *core, const Address &me, list
&addresses) : ChatRoom(*new ChatRoomPrivate(core)), RemoteConference(core, me, nullptr) { string factoryUri = linphone_core_get_chat_conference_factory_uri(core); focus = make_shared(factoryUri);