diff --git a/apps/dsm/mods/mod_utils/ModUtils.cpp b/apps/dsm/mods/mod_utils/ModUtils.cpp index 13c043e8..86e044e0 100644 --- a/apps/dsm/mods/mod_utils/ModUtils.cpp +++ b/apps/dsm/mods/mod_utils/ModUtils.cpp @@ -872,4 +872,4 @@ EXEC_ACTION_START(SCDecryptCodeAes128CBC) { /* unbase64() uses malloc, don't forget to free() */ free(encryptedCodeRaw); -} EXEC_ACTION_END; \ No newline at end of file +} EXEC_ACTION_END; diff --git a/core/AmB2BSession.h b/core/AmB2BSession.h index 542193c9..ffb85fea 100644 --- a/core/AmB2BSession.h +++ b/core/AmB2BSession.h @@ -95,7 +95,7 @@ struct B2BSipReplyEvent: public B2BSipEvent string sender_ltag; B2BSipReplyEvent(const AmSipReply& reply, bool forward, - string trans_method, string sender_ltag) + const string& trans_method, const string& sender_ltag) : B2BSipEvent(B2BSipReply,forward), reply(reply), trans_method(trans_method), sender_ltag(sender_ltag) { } diff --git a/core/AmConferenceChannel.cpp b/core/AmConferenceChannel.cpp index 3b2f86a5..a53c184e 100644 --- a/core/AmConferenceChannel.cpp +++ b/core/AmConferenceChannel.cpp @@ -5,9 +5,17 @@ #include #include -AmConferenceChannel::AmConferenceChannel(AmConferenceStatus* status, int channel_id, string channel_tag, bool own_channel) - : status(status), channel_id(channel_id), channel_tag(channel_tag), own_channel(own_channel), - have_in_sr(false), have_out_sr(false), in_file(NULL), out_file(NULL) +AmConferenceChannel::AmConferenceChannel(AmConferenceStatus* status, int channel_id, + const string& channel_tag, bool own_channel) + : + own_channel(own_channel), + channel_id(channel_id), + channel_tag(channel_tag), + status(status), + have_in_sr(false), + have_out_sr(false), + in_file(NULL), + out_file(NULL) { assert(status); conf_id = status->getConfID(); diff --git a/core/AmConferenceChannel.h b/core/AmConferenceChannel.h index 501600e4..e4415fea 100644 --- a/core/AmConferenceChannel.h +++ b/core/AmConferenceChannel.h @@ -81,7 +81,7 @@ class AmConferenceChannel: public AmAudio public: AmConferenceChannel(AmConferenceStatus* status, - int channel_id, string channel_tag, bool own_channel); + int channel_id, const string& channel_tag, bool own_channel); ~AmConferenceChannel(); diff --git a/core/AmEventDispatcher.h b/core/AmEventDispatcher.h index c0757bb8..e2c650c4 100644 --- a/core/AmEventDispatcher.h +++ b/core/AmEventDispatcher.h @@ -48,7 +48,7 @@ public: QueueEntry(AmEventQueueInterface* q) : q(q), id() {} - QueueEntry(AmEventQueueInterface* q, string id) + QueueEntry(AmEventQueueInterface* q, const string& id) : q(q), id(id){} }; diff --git a/core/AmSdp.cpp b/core/AmSdp.cpp index 59d5c6dd..0bd475aa 100644 --- a/core/AmSdp.cpp +++ b/core/AmSdp.cpp @@ -52,8 +52,8 @@ static char* parse_until(char* s, char* end, char c); static bool contains(char* s, char* next_line, char c); static bool is_wsp(char s); -static MediaType media_type(std::string media); -static TransProt transport_type(std::string transport); +static MediaType media_type(const std::string& media); +static TransProt transport_type(const std::string& transport); static bool attr_check(std::string attr); enum parse_st {SDP_DESCR, SDP_MEDIA}; @@ -858,7 +858,7 @@ static void parse_sdp_media(AmSdp* sdp_msg, char* s) if (next > media_line) media = string(media_line, int(next-media_line) - 1); - m.type = media_type(std::move(media)); + m.type = media_type(media); if (m.type == MT_NONE) { ERROR("parse_sdp_media: Unknown media type\n"); @@ -1501,7 +1501,7 @@ inline char* skip_till_next_line(char* s, size_t& line_len) /* *Check if known media type is used */ -static MediaType media_type(std::string media) +static MediaType media_type(const std::string& media) { if(media == "audio") return MT_AUDIO; @@ -1519,7 +1519,7 @@ static MediaType media_type(std::string media) return MT_NONE; } -static TransProt transport_type(string transport) +static TransProt transport_type(const string& transport) { string transport_uc = transport; std::transform(transport_uc.begin(), transport_uc.end(), transport_uc.begin(), toupper); diff --git a/core/AmSession.h b/core/AmSession.h index 5e90a19e..9abfd00e 100644 --- a/core/AmSession.h +++ b/core/AmSession.h @@ -203,7 +203,7 @@ public: int code; string reason; string hdrs; - Exception(int c, string r, string h="") : code(c), reason(r), hdrs(h) {} + Exception(int c, const string& r, const string& h="") : code(c), reason(r), hdrs(h) {} }; /**