diff options
author | Underground78 <underground78@users.sourceforge.net> | 2016-01-14 01:22:42 +0300 |
---|---|---|
committer | Underground78 <underground78@users.sourceforge.net> | 2016-01-18 00:14:36 +0300 |
commit | 249e6198a41e379807f224de9c3772fbf3bbfaca (patch) | |
tree | 42f314698b82bfdb5b8f6da02ecfcaefb628ce47 | |
parent | 5885bb889e7bbe69984ede7a15705276f52e2aee (diff) |
Use INTERNET_PORT for the internet port representation.
Avoid getting a C4244 warning.
-rw-r--r-- | TimXmlRpc.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/TimXmlRpc.cpp b/TimXmlRpc.cpp index 90b212d..8f8ab4b 100644 --- a/TimXmlRpc.cpp +++ b/TimXmlRpc.cpp @@ -1218,7 +1218,7 @@ class XmlRpcImplementation { HINTERNET hInternet; HINTERNET hConnect; std::string object; - int port; + INTERNET_PORT port; void hadError(const char* function); bool connect(const char* server); @@ -1242,7 +1242,7 @@ public: int HttpErrcode; bool isFault; - XmlRpcImplementation(const char* server, int port, const char* object, XmlRpcClient::protocol_enum protocol); + XmlRpcImplementation(const char* server, INTERNET_PORT port, const char* object, XmlRpcClient::protocol_enum protocol); XmlRpcImplementation(const char* URI); bool execute(const char* method, XmlRpcValue const& params, XmlRpcValue& result); void setCallback(XmlRpcCallback Callback, void* context) @@ -1254,7 +1254,7 @@ public: XmlRpcClient::XmlRpcClient(const char* server, int port, const char* object, protocol_enum protocol) { - secret = new XmlRpcImplementation(server, port, object, protocol); + secret = new XmlRpcImplementation(server, (INTERNET_PORT)port, object, protocol); } @@ -1328,7 +1328,7 @@ void XmlRpcClient::close() } -XmlRpcImplementation::XmlRpcImplementation(const char* server, int _port, const char* _object, +XmlRpcImplementation::XmlRpcImplementation(const char* server, INTERNET_PORT _port, const char* _object, XmlRpcClient::protocol_enum _protocol) { port = _port; @@ -1368,7 +1368,7 @@ XmlRpcImplementation::XmlRpcImplementation(const char* URI) std::string server(URI, t - URI); if (*t == ':') { t++; - port = atoi(t); + port = (INTERNET_PORT)atoi(t); while (*t >= '0' && *t <= '9') t++; } |