diff --git a/src/account.cpp b/src/account.cpp index 4d25ef5c11e83a9ff4aefa528a090edc6f998482..cd378463e5feca78ed633fcda20f338645c39f5f 100644 --- a/src/account.cpp +++ b/src/account.cpp @@ -312,7 +312,7 @@ Account::getAccountDetails() const {Conf::CONFIG_ACCOUNT_USERAGENT, hasCustomUserAgent_ ? userAgent_ : DEFAULT_USER_AGENT}, {Conf::CONFIG_ACCOUNT_HAS_CUSTOM_USERAGENT, hasCustomUserAgent_ ? userAgent_ : DEFAULT_USER_AGENT}, {Conf::CONFIG_ACCOUNT_AUTOANSWER, autoAnswerEnabled_ ? TRUE_STR : FALSE_STR}, - {DRing::Account::ConfProperties::ACTIVE_CALL_LIMIT, jami::to_string(activeCallLimit_)}, + {DRing::Account::ConfProperties::ACTIVE_CALL_LIMIT, std::to_string(activeCallLimit_)}, {Conf::CONFIG_RINGTONE_ENABLED, ringtoneEnabled_ ? TRUE_STR : FALSE_STR}, {Conf::CONFIG_RINGTONE_PATH, ringtonePath_}, {Conf::CONFIG_UPNP_ENABLED, upnp_ ? TRUE_STR : FALSE_STR} diff --git a/src/call.cpp b/src/call.cpp index c06922dfeabaf8c4a000b79f576832af67ee65a9..b61b2fd75cae5ffea45ac8ae7459afed63c33cbb 100644 --- a/src/call.cpp +++ b/src/call.cpp @@ -336,12 +336,12 @@ std::map<std::string, std::string> Call::getDetails() const { return { - {DRing::Call::Details::CALL_TYPE, jami::to_string((unsigned)type_)}, + {DRing::Call::Details::CALL_TYPE, std::to_string((unsigned)type_)}, {DRing::Call::Details::PEER_NUMBER, peerNumber_}, {DRing::Call::Details::DISPLAY_NAME, peerDisplayName_}, {DRing::Call::Details::CALL_STATE, getStateStr()}, {DRing::Call::Details::CONF_ID, confID_}, - {DRing::Call::Details::TIMESTAMP_START, jami::to_string(timestamp_start_)}, + {DRing::Call::Details::TIMESTAMP_START, std::to_string(timestamp_start_)}, {DRing::Call::Details::ACCOUNTID, getAccountId()}, {DRing::Call::Details::AUDIO_MUTED, std::string(bool_to_str(isAudioMuted_))}, {DRing::Call::Details::VIDEO_MUTED, std::string(bool_to_str(isVideoMuted_))}, diff --git a/src/client/videomanager.cpp b/src/client/videomanager.cpp index fd0836082cf469da87d660bf058e64ec2750687c..1d110f89ae039cdc8592fc18d1fcb40bdb2e6fe9 100644 --- a/src/client/videomanager.cpp +++ b/src/client/videomanager.cpp @@ -515,8 +515,8 @@ getRenderer(const std::string& callId) return { {DRing::Media::Details::CALL_ID, callId}, {DRing::Media::Details::SHM_PATH, sink->openedName()}, - {DRing::Media::Details::WIDTH, jami::to_string(sink->getWidth())}, - {DRing::Media::Details::HEIGHT, jami::to_string(sink->getHeight())}, + {DRing::Media::Details::WIDTH, std::to_string(sink->getWidth())}, + {DRing::Media::Details::HEIGHT, std::to_string(sink->getHeight())}, }; else return { diff --git a/src/jamidht/jamiaccount.cpp b/src/jamidht/jamiaccount.cpp index a49ec709b7a35bf4c06db8984822c2fe879b47cd..135faf3a80585249e31370b50b0c498a834a03d9 100644 --- a/src/jamidht/jamiaccount.cpp +++ b/src/jamidht/jamiaccount.cpp @@ -1588,7 +1588,7 @@ JamiAccount::getAccountDetails() const { std::lock_guard<std::mutex> lock(configurationMutex_); std::map<std::string, std::string> a = SIPAccountBase::getAccountDetails(); - a.emplace(Conf::CONFIG_DHT_PORT, jami::to_string(dhtPort_)); + a.emplace(Conf::CONFIG_DHT_PORT, std::to_string(dhtPort_)); a.emplace(Conf::CONFIG_DHT_PUBLIC_IN_CALLS, dhtPublicInCalls_ ? TRUE_STR : FALSE_STR); a.emplace(DRing::Account::ConfProperties::DHT_PEER_DISCOVERY, dhtPeerDiscovery_ ? TRUE_STR : FALSE_STR); a.emplace(DRing::Account::ConfProperties::RING_DEVICE_ID, ringDeviceId_); diff --git a/src/jamidht/namedirectory.cpp b/src/jamidht/namedirectory.cpp index 571021eb35b13c812f4d1209549395229526b2e3..37f4dbb3b8872a918c3c9276602cf1a1711f9f5c 100644 --- a/src/jamidht/namedirectory.cpp +++ b/src/jamidht/namedirectory.cpp @@ -314,7 +314,7 @@ void NameDirectory::registerName(const std::string& addr, const std::string& n, body = ss.str(); } request->set_body(body); - request->set_header("Content-Length", jami::to_string(body.size())); + request->set_header("Content-Length", std::to_string(body.size())); auto params = std::make_shared<restbed::Settings>(); params->set_connection_timeout(std::chrono::seconds(120)); diff --git a/src/manager.cpp b/src/manager.cpp index 5d9cb51ea74ca88a6f52c89f108e7ca18652d456..7b88947251a843578d51a584e95681a78aebab14 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -2686,12 +2686,12 @@ Manager::testAccountICEInitialization(const std::string& accountID) if (ice->waitForInitialization(ICE_INIT_TIMEOUT) <= 0) { - result["STATUS"] = jami::to_string((int) DRing::Account::testAccountICEInitializationStatus::FAILURE); + result["STATUS"] = std::to_string((int) DRing::Account::testAccountICEInitializationStatus::FAILURE); result["MESSAGE"] = ice->getLastErrMsg(); } else { - result["STATUS"] = jami::to_string((int) DRing::Account::testAccountICEInitializationStatus::SUCCESS); + result["STATUS"] = std::to_string((int) DRing::Account::testAccountICEInitializationStatus::SUCCESS); result["MESSAGE"] = ""; } diff --git a/src/media/media_codec.cpp b/src/media/media_codec.cpp index e7776a4a4533a3ef7fa41b335f0e62bf7333fa2a..f40a9baec621b1cef03b34a17c351584d35c689b 100644 --- a/src/media/media_codec.cpp +++ b/src/media/media_codec.cpp @@ -86,9 +86,9 @@ SystemAudioCodecInfo::getCodecSpecifications() return { {DRing::Account::ConfProperties::CodecInfo::NAME, name}, {DRing::Account::ConfProperties::CodecInfo::TYPE, (mediaType & MEDIA_AUDIO ? "AUDIO" : "VIDEO")}, - {DRing::Account::ConfProperties::CodecInfo::BITRATE, to_string(bitrate)}, - {DRing::Account::ConfProperties::CodecInfo::SAMPLE_RATE, to_string(audioformat.sample_rate)}, - {DRing::Account::ConfProperties::CodecInfo::CHANNEL_NUMBER, to_string(audioformat.nb_channels)} + {DRing::Account::ConfProperties::CodecInfo::BITRATE, std::to_string(bitrate)}, + {DRing::Account::ConfProperties::CodecInfo::SAMPLE_RATE, std::to_string(audioformat.sample_rate)}, + {DRing::Account::ConfProperties::CodecInfo::CHANNEL_NUMBER, std::to_string(audioformat.nb_channels)} }; } @@ -119,10 +119,10 @@ SystemVideoCodecInfo::getCodecSpecifications() return { {DRing::Account::ConfProperties::CodecInfo::NAME, name}, {DRing::Account::ConfProperties::CodecInfo::TYPE, (mediaType & MEDIA_AUDIO ? "AUDIO" : "VIDEO")}, - {DRing::Account::ConfProperties::CodecInfo::BITRATE, to_string(bitrate)}, - {DRing::Account::ConfProperties::CodecInfo::FRAME_RATE, to_string(frameRate)}, - {DRing::Account::ConfProperties::CodecInfo::MIN_BITRATE, to_string(minBitrate)}, - {DRing::Account::ConfProperties::CodecInfo::MAX_BITRATE, to_string(maxBitrate)}, + {DRing::Account::ConfProperties::CodecInfo::BITRATE, std::to_string(bitrate)}, + {DRing::Account::ConfProperties::CodecInfo::FRAME_RATE, std::to_string(frameRate)}, + {DRing::Account::ConfProperties::CodecInfo::MIN_BITRATE, std::to_string(minBitrate)}, + {DRing::Account::ConfProperties::CodecInfo::MAX_BITRATE, std::to_string(maxBitrate)}, }; } @@ -161,9 +161,9 @@ AccountAudioCodecInfo::getCodecSpecifications() return { {DRing::Account::ConfProperties::CodecInfo::NAME, systemCodecInfo.name}, {DRing::Account::ConfProperties::CodecInfo::TYPE, (systemCodecInfo.mediaType & MEDIA_AUDIO ? "AUDIO" : "VIDEO")}, - {DRing::Account::ConfProperties::CodecInfo::BITRATE, to_string(bitrate)}, - {DRing::Account::ConfProperties::CodecInfo::SAMPLE_RATE, to_string(audioformat.sample_rate)}, - {DRing::Account::ConfProperties::CodecInfo::CHANNEL_NUMBER, to_string(audioformat.nb_channels)} + {DRing::Account::ConfProperties::CodecInfo::BITRATE, std::to_string(bitrate)}, + {DRing::Account::ConfProperties::CodecInfo::SAMPLE_RATE, std::to_string(audioformat.sample_rate)}, + {DRing::Account::ConfProperties::CodecInfo::CHANNEL_NUMBER, std::to_string(audioformat.nb_channels)} }; } @@ -197,13 +197,13 @@ AccountVideoCodecInfo::getCodecSpecifications() return { {DRing::Account::ConfProperties::CodecInfo::NAME, systemCodecInfo.name}, {DRing::Account::ConfProperties::CodecInfo::TYPE, (systemCodecInfo.mediaType & MEDIA_AUDIO ? "AUDIO" : "VIDEO")}, - {DRing::Account::ConfProperties::CodecInfo::BITRATE, to_string(bitrate)}, - {DRing::Account::ConfProperties::CodecInfo::MAX_BITRATE, to_string(systemCodecInfo.maxBitrate)}, - {DRing::Account::ConfProperties::CodecInfo::MIN_BITRATE, to_string(systemCodecInfo.minBitrate)}, - {DRing::Account::ConfProperties::CodecInfo::QUALITY, to_string(quality)}, - {DRing::Account::ConfProperties::CodecInfo::MAX_QUALITY, to_string(systemCodecInfo.maxQuality)}, - {DRing::Account::ConfProperties::CodecInfo::MIN_QUALITY, to_string(systemCodecInfo.minQuality)}, - {DRing::Account::ConfProperties::CodecInfo::FRAME_RATE, to_string(frameRate)}, + {DRing::Account::ConfProperties::CodecInfo::BITRATE, std::to_string(bitrate)}, + {DRing::Account::ConfProperties::CodecInfo::MAX_BITRATE, std::to_string(systemCodecInfo.maxBitrate)}, + {DRing::Account::ConfProperties::CodecInfo::MIN_BITRATE, std::to_string(systemCodecInfo.minBitrate)}, + {DRing::Account::ConfProperties::CodecInfo::QUALITY, std::to_string(quality)}, + {DRing::Account::ConfProperties::CodecInfo::MAX_QUALITY, std::to_string(systemCodecInfo.maxQuality)}, + {DRing::Account::ConfProperties::CodecInfo::MIN_QUALITY, std::to_string(systemCodecInfo.minQuality)}, + {DRing::Account::ConfProperties::CodecInfo::FRAME_RATE, std::to_string(frameRate)}, {DRing::Account::ConfProperties::CodecInfo::AUTO_QUALITY_ENABLED, bool_to_str(isAutoQualityEnabled)} }; } diff --git a/src/media/media_encoder.cpp b/src/media/media_encoder.cpp index 53d82345e2178e2d57fb57e195e22e2470c11cd2..c3f56439b1ed908bbb4f27fff7bce80cef2f5ce6 100644 --- a/src/media/media_encoder.cpp +++ b/src/media/media_encoder.cpp @@ -99,9 +99,9 @@ MediaEncoder::setOptions(const MediaStream& opts) void MediaEncoder::setOptions(const MediaDescription& args) { - libav_utils::setDictValue(&options_, "payload_type", jami::to_string(args.payload_type)); - libav_utils::setDictValue(&options_, "max_rate", jami::to_string(args.codec->bitrate)); - libav_utils::setDictValue(&options_, "crf", jami::to_string(args.codec->quality)); + libav_utils::setDictValue(&options_, "payload_type", std::to_string(args.payload_type)); + libav_utils::setDictValue(&options_, "max_rate", std::to_string(args.codec->bitrate)); + libav_utils::setDictValue(&options_, "crf", std::to_string(args.codec->quality)); if (not args.parameters.empty()) libav_utils::setDictValue(&options_, "parameters", args.parameters); diff --git a/src/media/video/video_device.h b/src/media/video/video_device.h index 16ea85fef854e46cfdbdb76ca2c2ff8d692aaca2..cf2b5cf8fbdb8d75c53332799aa1f7d8dbfa6428 100644 --- a/src/media/video/video_device.h +++ b/src/media/video/video_device.h @@ -83,7 +83,7 @@ public: auto rates = getRateList(chan, size); std::vector<std::string> rates_str {rates.size()}; std::transform(rates.begin(), rates.end(), rates_str.begin(), - [](FrameRate r) { return jami::to_string(r.real()); }); + [](FrameRate r) { return std::to_string(r.real()); }); cap[chan][sz.str()] = std::move(rates_str); } @@ -124,7 +124,7 @@ public: std::stringstream video_size; video_size << max_size.first << "x" << max_size.second; settings.video_size = video_size.str(); - settings.framerate = jami::to_string(max_size_rate.real()); + settings.framerate = std::to_string(max_size_rate.real()); JAMI_WARN("Default video settings: %s, %s FPS", settings.video_size.c_str(), settings.framerate.c_str()); } @@ -141,7 +141,7 @@ public: settings.name = params.name; settings.channel = params.channel_name; settings.video_size = sizeToString(params.width, params.height); - settings.framerate = jami::to_string(params.framerate.real()); + settings.framerate = std::to_string(params.framerate.real()); return settings; } diff --git a/src/media/video/video_rtp_session.cpp b/src/media/video/video_rtp_session.cpp index 82fa856dda1ab01ff933ba3d8139f27c4189c40c..b85350dd7951a83be7019cf61db37e6793379114 100644 --- a/src/media/video/video_rtp_session.cpp +++ b/src/media/video/video_rtp_session.cpp @@ -540,12 +540,12 @@ VideoRtpSession::storeVideoBitrateInfo() { if (codecVideo) { codecVideo->setCodecSpecifications({ - {DRing::Account::ConfProperties::CodecInfo::BITRATE, jami::to_string(videoBitrateInfo_.videoBitrateCurrent)}, - {DRing::Account::ConfProperties::CodecInfo::MIN_BITRATE, jami::to_string(videoBitrateInfo_.videoBitrateMin)}, - {DRing::Account::ConfProperties::CodecInfo::MAX_BITRATE, jami::to_string(videoBitrateInfo_.videoBitrateMax)}, - {DRing::Account::ConfProperties::CodecInfo::QUALITY, jami::to_string(videoBitrateInfo_.videoQualityCurrent)}, - {DRing::Account::ConfProperties::CodecInfo::MIN_QUALITY, jami::to_string(videoBitrateInfo_.videoQualityMin)}, - {DRing::Account::ConfProperties::CodecInfo::MAX_QUALITY, jami::to_string(videoBitrateInfo_.videoQualityMax)} + {DRing::Account::ConfProperties::CodecInfo::BITRATE, std::to_string(videoBitrateInfo_.videoBitrateCurrent)}, + {DRing::Account::ConfProperties::CodecInfo::MIN_BITRATE, std::to_string(videoBitrateInfo_.videoBitrateMin)}, + {DRing::Account::ConfProperties::CodecInfo::MAX_BITRATE, std::to_string(videoBitrateInfo_.videoBitrateMax)}, + {DRing::Account::ConfProperties::CodecInfo::QUALITY, std::to_string(videoBitrateInfo_.videoQualityCurrent)}, + {DRing::Account::ConfProperties::CodecInfo::MIN_QUALITY, std::to_string(videoBitrateInfo_.videoQualityMin)}, + {DRing::Account::ConfProperties::CodecInfo::MAX_QUALITY, std::to_string(videoBitrateInfo_.videoQualityMax)} }); if (histoQuality_.size() > MAX_SIZE_HISTO_QUALITY_) diff --git a/src/preferences.cpp b/src/preferences.cpp index 73469669a23e7963a15a5b2f28b319ad15cc3ca1..181d2cec0d7c00bb51dbf39c7a3f98063b3ea6de 100644 --- a/src/preferences.cpp +++ b/src/preferences.cpp @@ -365,7 +365,7 @@ AudioPreference::createAudioLayer() if (audioApi_ == JACK_API_STR) { try { if (auto ret = system("jack_lsp > /dev/null")) - throw std::runtime_error("Error running jack_lsp: " + to_string(ret)); + throw std::runtime_error("Error running jack_lsp: " + std::to_string(ret)); return new JackLayer(*this); } catch (const std::runtime_error& e) { JAMI_ERR("%s", e.what()); diff --git a/src/sip/sdp.cpp b/src/sip/sdp.cpp index e696a04d2fffd1a9e5164a06713b89a70c282538..0e724c9ee22971dc302d512d70d353cdd6b7fba2 100644 --- a/src/sip/sdp.cpp +++ b/src/sip/sdp.cpp @@ -195,7 +195,7 @@ Sdp::setMediaDescriptorLines(bool audio, bool holding, sip_utils::KeyExchangePro enc_name = accountAudioCodec->systemCodecInfo.name; if (accountAudioCodec->audioformat.nb_channels > 1) { - channels = jami::to_string(accountAudioCodec->audioformat.nb_channels); + channels = std::to_string(accountAudioCodec->audioformat.nb_channels); rtpmap.param.ptr = (char *) channels.c_str(); rtpmap.param.slen = strlen(channels.c_str()); // don't include NULL terminator } diff --git a/src/sip/sipaccount.cpp b/src/sip/sipaccount.cpp index 81d66999164253853bb9b540ac58e3bcb638bd4f..825b5dd84bccd9490c210b4e65edcd239909ba94 100644 --- a/src/sip/sipaccount.cpp +++ b/src/sip/sipaccount.cpp @@ -622,9 +622,9 @@ SIPAccount::getAccountDetails() const } a.emplace(Conf::CONFIG_ACCOUNT_PASSWORD, std::move(password)); - a.emplace(Conf::CONFIG_LOCAL_PORT, jami::to_string(localPort_)); + a.emplace(Conf::CONFIG_LOCAL_PORT, std::to_string(localPort_)); a.emplace(Conf::CONFIG_ACCOUNT_ROUTESET, serviceRoute_); - a.emplace(Conf::CONFIG_ACCOUNT_REGISTRATION_EXPIRE, jami::to_string(registrationExpire_)); + a.emplace(Conf::CONFIG_ACCOUNT_REGISTRATION_EXPIRE, std::to_string(registrationExpire_)); a.emplace(Conf::CONFIG_KEEP_ALIVE_ENABLED, keepAliveEnabled_ ? TRUE_STR : FALSE_STR); a.emplace(Conf::CONFIG_PRESENCE_ENABLED, presence_ and presence_->isEnabled()? TRUE_STR : FALSE_STR); @@ -645,7 +645,7 @@ std::map<std::string, std::string> SIPAccount::getVolatileAccountDetails() const { auto a = SIPAccountBase::getVolatileAccountDetails(); - a.emplace(Conf::CONFIG_ACCOUNT_REGISTRATION_STATE_CODE, jami::to_string(registrationStateDetailed_.first)); + a.emplace(Conf::CONFIG_ACCOUNT_REGISTRATION_STATE_CODE, std::to_string(registrationStateDetailed_.first)); a.emplace(Conf::CONFIG_ACCOUNT_REGISTRATION_STATE_DESC, registrationStateDetailed_.second); a.emplace(DRing::Account::VolatileProperties::InstantMessaging::OFF_CALL, TRUE_STR); @@ -669,7 +669,7 @@ SIPAccount::getVolatileAccountDetails() const a.emplace(name_str.str(), ca->toString()); ca = ca->issuer; } - a.emplace(DRing::TlsTransport::TLS_PEER_CA_NUM, jami::to_string(n)); + a.emplace(DRing::TlsTransport::TLS_PEER_CA_NUM, std::to_string(n)); } return a; @@ -1665,7 +1665,7 @@ SIPAccount::getTlsSettings() const { return { {Conf::CONFIG_TLS_ENABLE, tlsEnable_ ? TRUE_STR : FALSE_STR}, - {Conf::CONFIG_TLS_LISTENER_PORT, jami::to_string(tlsListenerPort_)}, + {Conf::CONFIG_TLS_LISTENER_PORT, std::to_string(tlsListenerPort_)}, {Conf::CONFIG_TLS_CA_LIST_FILE, tlsCaListFile_}, {Conf::CONFIG_TLS_CERTIFICATE_FILE, tlsCertificateFile_}, {Conf::CONFIG_TLS_PRIVATE_KEY_FILE, tlsPrivateKeyFile_}, diff --git a/src/sip/sipaccountbase.cpp b/src/sip/sipaccountbase.cpp index 4bbc12950c38859476593a0747b32ea92896923b..7608e75a9f284d9cc266f177ed27e3857d820692 100644 --- a/src/sip/sipaccountbase.cpp +++ b/src/sip/sipaccountbase.cpp @@ -138,8 +138,8 @@ addRangeToDetails(std::map<std::string, std::string> &a, const char *minKey, const char *maxKey, const std::pair<uint16_t, uint16_t> &range) { - a.emplace(minKey, jami::to_string(range.first)); - a.emplace(maxKey, jami::to_string(range.second)); + a.emplace(minKey, std::to_string(range.first)); + a.emplace(maxKey, std::to_string(range.second)); } void SIPAccountBase::serialize(YAML::Emitter &out) const @@ -265,7 +265,7 @@ SIPAccountBase::getAccountDetails() const a.emplace(Conf::CONFIG_ACCOUNT_DTMF_TYPE, dtmfType_); a.emplace(Conf::CONFIG_LOCAL_INTERFACE, interface_); - a.emplace(Conf::CONFIG_PUBLISHED_PORT, jami::to_string(publishedPort_)); + a.emplace(Conf::CONFIG_PUBLISHED_PORT, std::to_string(publishedPort_)); a.emplace(Conf::CONFIG_PUBLISHED_SAMEAS_LOCAL, publishedSameasLocal_ ? TRUE_STR : FALSE_STR); a.emplace(Conf::CONFIG_PUBLISHED_ADDRESS, publishedIpAddress_); @@ -289,7 +289,7 @@ SIPAccountBase::getVolatileAccountDetails() const if (isIP2IP()) a[Conf::CONFIG_ACCOUNT_REGISTRATION_STATUS] = "READY"; - a.emplace(Conf::CONFIG_TRANSPORT_STATE_CODE, jami::to_string(transportStatus_)); + a.emplace(Conf::CONFIG_TRANSPORT_STATE_CODE, std::to_string(transportStatus_)); a.emplace(Conf::CONFIG_TRANSPORT_STATE_DESC, transportError_); return a; } diff --git a/src/sip/sipcall.cpp b/src/sip/sipcall.cpp index 7a24820a8d6eb8bab4c4e1f6a8336eb746fca0fd..6bcb89d744cf6a9cabd08d2bc24fee833c159224 100644 --- a/src/sip/sipcall.cpp +++ b/src/sip/sipcall.cpp @@ -1231,7 +1231,7 @@ SIPCall::getDetails() const ca = ca->issuer; } details.emplace(DRing::TlsTransport::TLS_PEER_CA_NUM, - jami::to_string(n)); + std::to_string(n)); } else { details.emplace(DRing::TlsTransport::TLS_PEER_CERT, ""); details.emplace(DRing::TlsTransport::TLS_PEER_CA_NUM, ""); diff --git a/src/sip/sipvoiplink.cpp b/src/sip/sipvoiplink.cpp index 47bd7e0ef9cdae731d0ba0f4fc4ad5ee34bf4933..0d82629714680097e732d4d1fed4c45766442bbe 100644 --- a/src/sip/sipvoiplink.cpp +++ b/src/sip/sipvoiplink.cpp @@ -1187,7 +1187,7 @@ SIPVoIPLink::resolveSrvName(const std::string &name, pjsip_transport_type_e type /*.addr = */{{(char*)name.c_str(), name_size}, port}, }; - const auto token = std::hash<std::string>()(name + to_string(type)); + const auto token = std::hash<std::string>()(name + std::to_string(type)); getResolveCallbackMap().registerCallback(token, [=,cb=std::move(cb)](pj_status_t s, const pjsip_server_addresses* r) { try { diff --git a/src/smartools.cpp b/src/smartools.cpp index 89e467462969c73a0ae9c54ea2d43472c62ada87..bad62e018f2f763adc40abadbb5b55dd185cf471 100644 --- a/src/smartools.cpp +++ b/src/smartools.cpp @@ -97,11 +97,11 @@ Smartools::setResolution(const std::string& id, int width, int height) { std::lock_guard<std::mutex> lk(mutexInfo_); if(id == "local"){ - information_["local width"] = to_string(width); - information_["local height"] = to_string(height); + information_["local width"] = std::to_string(width); + information_["local height"] = std::to_string(height); } else { - information_["remote width"] = to_string(width); - information_["remote height"] = to_string(height); + information_["remote width"] = std::to_string(width); + information_["remote height"] = std::to_string(height); } } diff --git a/src/string_utils.h b/src/string_utils.h index f30c94de792d26407e745b37e7370dc6aa4c3206..63e6e3de67096f514e93e6d703da9ccd546148f2 100644 --- a/src/string_utils.h +++ b/src/string_utils.h @@ -39,21 +39,12 @@ bool_to_str(bool b) noexcept return b ? TRUE_STR : FALSE_STR; } -std::string to_string(double value); - #ifdef _WIN32 std::wstring to_wstring(const std::string& s); std::string decodeMultibyteString(const std::string& s); std::string bstrToStdString(BSTR bstr); #endif -template <typename T> -inline std::string -to_string(T &&value) -{ - return std::to_string(std::forward<T>(value)); -} - static inline int stoi(const std::string& str) { diff --git a/src/upnp/upnp_context.cpp b/src/upnp/upnp_context.cpp index 5fc7adc952b6c3810ba120e27c7902f36c0e9d62..82c728623e97986e3a2b613881c38cc3d5cace5b 100644 --- a/src/upnp/upnp_context.cpp +++ b/src/upnp/upnp_context.cpp @@ -1184,7 +1184,7 @@ UPnPContext::removeMappingsByLocalIPAndDescription(const UPnPIGD& igd, const std std::unique_ptr<IXML_Document, decltype(ixmlDocument_free)&> action(nullptr, ixmlDocument_free); IXML_Document* action_ptr = nullptr; UpnpAddToAction(&action_ptr, "GetGenericPortMappingEntry", igd.getServiceType().c_str(), - "NewPortMappingIndex", jami::to_string(entry_idx).c_str()); + "NewPortMappingIndex", std::to_string(entry_idx).c_str()); action.reset(action_ptr); std::unique_ptr<IXML_Document, decltype(ixmlDocument_free)&> response(nullptr, ixmlDocument_free); diff --git a/src/upnp/upnp_igd.h b/src/upnp/upnp_igd.h index 34ddf911a27dc9f04f4b43a4f910c36388e5295e..b8ca95d73b479f320235704177b619e183de1ed3 100644 --- a/src/upnp/upnp_igd.h +++ b/src/upnp/upnp_igd.h @@ -68,9 +68,9 @@ public: friend bool operator!= (const Mapping& cRedir1, const Mapping& cRedir2); uint16_t getPortExternal() const { return port_external_; } - std::string getPortExternalStr() const { return jami::to_string(port_external_); } + std::string getPortExternalStr() const { return std::to_string(port_external_); } uint16_t getPortInternal() const { return port_internal_; } - std::string getPortInternalStr() const { return jami::to_string(port_internal_); } + std::string getPortInternalStr() const { return std::to_string(port_internal_); } PortType getType() const { return type_; } std::string getTypeStr() const { return type_ == PortType::UDP ? "UDP" : "TCP"; } std::string getDescription() const { return description_; }