diff options
Diffstat (limited to 'src/netbase.cpp')
-rw-r--r-- | src/netbase.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/netbase.cpp b/src/netbase.cpp index 4ce63cb0ec..607eb89573 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -20,7 +20,6 @@ #endif #include <boost/algorithm/string/case_conv.hpp> // for to_lower() -#include <boost/algorithm/string/predicate.hpp> // for startswith() and endswith() #if !defined(MSG_NOSIGNAL) #define MSG_NOSIGNAL 0 @@ -121,8 +120,7 @@ bool LookupHost(const char *pszName, std::vector<CNetAddr>& vIP, unsigned int nM std::string strHost(pszName); if (strHost.empty()) return false; - if (boost::algorithm::starts_with(strHost, "[") && boost::algorithm::ends_with(strHost, "]")) - { + if (strHost.front() == '[' && strHost.back() == ']') { strHost = strHost.substr(1, strHost.size() - 2); } |