diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/Network.cpp | 9 | ||||
-rw-r--r-- | cpp/src/Ice/Network.h | 3 |
2 files changed, 2 insertions, 10 deletions
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp index 7e76a350862..0b280166a37 100644 --- a/cpp/src/Ice/Network.cpp +++ b/cpp/src/Ice/Network.cpp @@ -569,18 +569,13 @@ IceUtil::Shared* IceInternal::upCast(SOCKSNetworkProxy* p) { return p; } IceInternal::SOCKSNetworkProxy::SOCKSNetworkProxy(const string& host, int port) : _host(host), _port(port) { + assert(!host.empty()); memset(&_address, 0, sizeof(_address)); -#ifndef NDEBUG - _haveAddress = false; -#endif } IceInternal::SOCKSNetworkProxy::SOCKSNetworkProxy(const Address& addr) : _port(0), _address(addr) { -#ifndef NDEBUG - _haveAddress = true; -#endif } void @@ -667,7 +662,7 @@ IceInternal::SOCKSNetworkProxy::resolveHost() const Address IceInternal::SOCKSNetworkProxy::getAddress() const { - assert(_haveAddress); // Host must be resolved. + assert(_host.empty()); // Host must be resolved. return _address; } diff --git a/cpp/src/Ice/Network.h b/cpp/src/Ice/Network.h index 46b01689ec0..c9416ee4ef6 100644 --- a/cpp/src/Ice/Network.h +++ b/cpp/src/Ice/Network.h @@ -257,9 +257,6 @@ private: std::string _host; int _port; Address _address; -#ifndef NDEBUG - bool _haveAddress; -#endif }; ICE_API bool noMoreFds(int); |