From 50cd179a609b036127fc0391493be2f893159c94 Mon Sep 17 00:00:00 2001 From: Lee Clagett Date: Sat, 18 Mar 2017 22:05:14 -0400 Subject: Removed boost/asio.hpp include from epee/string_tools.h --- contrib/epee/include/string_tools.h | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) (limited to 'contrib/epee/include/string_tools.h') diff --git a/contrib/epee/include/string_tools.h b/contrib/epee/include/string_tools.h index 6292e471c..530000028 100644 --- a/contrib/epee/include/string_tools.h +++ b/contrib/epee/include/string_tools.h @@ -29,17 +29,21 @@ #ifndef _STRING_TOOLS_H_ #define _STRING_TOOLS_H_ +// Previously pulled in by ASIO, further cleanup still required ... +#ifdef _WIN32 +# include +# include +#endif + //#include #include #include #include +#include #include -//#include #include #include #include -#include -#include #include #include "warnings.h" @@ -327,26 +331,9 @@ POP_WARNINGS } //---------------------------------------------------------------------------- -//#ifdef _WINSOCK2API_ - inline std::string get_ip_string_from_int32(uint32_t ip) - { - in_addr adr; - adr.s_addr = ip; - const char* pbuf = inet_ntoa(adr); - if(pbuf) - return pbuf; - else - return "[failed]"; - } + std::string get_ip_string_from_int32(uint32_t ip); //---------------------------------------------------------------------------- - inline bool get_ip_int32_from_string(uint32_t& ip, const std::string& ip_str) - { - ip = inet_addr(ip_str.c_str()); - if(INADDR_NONE == ip) - return false; - - return true; - } + bool get_ip_int32_from_string(uint32_t& ip, const std::string& ip_str); //---------------------------------------------------------------------------- inline bool parse_peer_from_string(uint32_t& ip, uint32_t& port, const std::string& addres) { @@ -376,7 +363,6 @@ POP_WARNINGS return true; } -//#endif //---------------------------------------------------------------------------- template inline std::string get_t_as_hex_nwidth(const t& v, std::streamsize w = 8) -- cgit v1.2.3