From 5a108ecdac60de39af102d9c158a87ab1c9ee6b2 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 13 Aug 2014 22:30:47 +0200 Subject: [PATCH] [DEV] change default Instance --- enet/Http.cpp | 8 ++++---- enet/Tcp.cpp | 8 ++++---- test/main.cpp | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/enet/Http.cpp b/enet/Http.cpp index cba2c92..54973fc 100644 --- a/enet/Http.cpp +++ b/enet/Http.cpp @@ -143,7 +143,7 @@ bool enet::Http::receiveData() { return false; } // parse header : - std::vector list = std::split(header, '\n'); + std::vector list = etk::split(header, '\n'); headerEnded = false; m_receiveHeader.clear(); for (auto element : list) { @@ -177,12 +177,12 @@ bool enet::Http::receiveData() { } */ // parse base answear: - list = std::split(header, ' '); + list = etk::split(header, ' '); if (list.size() < 2) { ENET_ERROR("can not parse answear : " << list); return false; } - int32_t ret = std::stoi(list[1]); + int32_t ret = etk::string_to_int32_t(list[1]); switch (ret/100) { case 1: // information message @@ -279,7 +279,7 @@ bool enet::Http::post(const std::string& _address, const std::string& _contentTy } req += " HTTP/1.0\n"; setSendHeaderProperties("Content-Type", _contentType); - setSendHeaderProperties("Content-Length", std::to_string(_data.size())); + setSendHeaderProperties("Content-Length", etk::to_string(_data.size())); // add header properties : for (auto &it : m_sendHeader) { req += escapeChar(it.first) + ": " + escapeChar(it.second) + "\n"; diff --git a/enet/Tcp.cpp b/enet/Tcp.cpp index 70136f8..47c883b 100644 --- a/enet/Tcp.cpp +++ b/enet/Tcp.cpp @@ -36,13 +36,13 @@ enet::Tcp::~Tcp() { void enet::Tcp::setIpV4(uint8_t _fist, uint8_t _second, uint8_t _third, uint8_t _quatro) { std::string tmpname; - tmpname = std::to_string(_fist); + tmpname = etk::to_string(_fist); tmpname += "."; - tmpname += std::to_string(_second); + tmpname += etk::to_string(_second); tmpname += "."; - tmpname += std::to_string(_third); + tmpname += etk::to_string(_third); tmpname += "."; - tmpname += std::to_string(_quatro); + tmpname += etk::to_string(_quatro); setHostNane(tmpname); } diff --git a/test/main.cpp b/test/main.cpp index 159f531..4a1acef 100644 --- a/test/main.cpp +++ b/test/main.cpp @@ -91,7 +91,7 @@ int main(int argc, const char *argv[]) { } int32_t iii = 0; while (connection.getConnectionStatus() == enet::Tcp::statusLink) { - int32_t len = connection.write("plop" + std::to_string(iii)); + int32_t len = connection.write("plop" + etk::to_string(iii)); APPL_INFO("write len=" << len); iii++; }