From f6dc68dbf08a66b9418bb25381ff1f02c7ddaaa5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com>
Date: Thu, 23 May 2019 09:31:44 -0400
Subject: [PATCH] string utils: remove to_string

Change-Id: If34adb4833dff7ea71175bb7f465f48cb3758d55
---
 src/account.cpp                       |  2 +-
 src/call.cpp                          |  4 ++--
 src/client/videomanager.cpp           |  4 ++--
 src/jamidht/jamiaccount.cpp           |  2 +-
 src/jamidht/namedirectory.cpp         |  2 +-
 src/manager.cpp                       |  4 ++--
 src/media/media_codec.cpp             | 34 +++++++++++++--------------
 src/media/media_encoder.cpp           |  6 ++---
 src/media/video/video_device.h        |  6 ++---
 src/media/video/video_rtp_session.cpp | 12 +++++-----
 src/preferences.cpp                   |  2 +-
 src/sip/sdp.cpp                       |  2 +-
 src/sip/sipaccount.cpp                | 10 ++++----
 src/sip/sipaccountbase.cpp            |  8 +++----
 src/sip/sipcall.cpp                   |  2 +-
 src/sip/sipvoiplink.cpp               |  2 +-
 src/smartools.cpp                     |  8 +++----
 src/string_utils.h                    |  9 -------
 src/upnp/upnp_context.cpp             |  2 +-
 src/upnp/upnp_igd.h                   |  4 ++--
 20 files changed, 58 insertions(+), 67 deletions(-)

diff --git a/src/account.cpp b/src/account.cpp
index 4d25ef5c11..cd378463e5 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 c06922dfea..b61b2fd75c 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 fd0836082c..1d110f89ae 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 a49ec709b7..135faf3a80 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 571021eb35..37f4dbb3b8 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 5d9cb51ea7..7b88947251 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 e7776a4a45..f40a9baec6 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 53d82345e2..c3f56439b1 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 16ea85fef8..cf2b5cf8fb 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 82fa856dda..b85350dd79 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 73469669a2..181d2cec0d 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 e696a04d2f..0e724c9ee2 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 81d6699916..825b5dd84b 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 4bbc12950c..7608e75a9f 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 7a24820a8d..6bcb89d744 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 47bd7e0ef9..0d82629714 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 89e4674629..bad62e018f 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 f30c94de79..63e6e3de67 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 5fc7adc952..82c728623e 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 34ddf911a2..b8ca95d73b 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_; }
-- 
GitLab