X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fnet.cpp;h=e5cb6d4b24955ce1f0ed8f0a40a9991f8cc8ccf2;hb=ea22a380de824500644db6fd6f33d0465b34f7a1;hp=c4bd027de2dfec05d7d19efe329bcce651ef4fa2;hpb=0c3aa881e2ac7a6142fcfcbb9b7d2824532fe522;p=novacoin.git diff --git a/src/net.cpp b/src/net.cpp index c4bd027..e5cb6d4 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -13,6 +13,8 @@ #ifdef WIN32 #include +#else +#include #endif #ifdef USE_UPNP @@ -159,14 +161,14 @@ bool GetMyExternalIP2(const CService& addrConnect, const char* pszGet, const cha } if (pszKeyword == NULL) break; - if (strLine.find(pszKeyword) != -1) + if (strLine.find(pszKeyword) != string::npos) { strLine = strLine.substr(strLine.find(pszKeyword) + strlen(pszKeyword)); break; } } closesocket(hSocket); - if (strLine.find("<") != -1) + if (strLine.find("<") != string::npos) strLine = strLine.substr(0, strLine.find("<")); strLine = strLine.substr(strspn(strLine.c_str(), " \t\n\r")); while (strLine.size() > 0 && isspace(strLine[strLine.size()-1]))