summaryrefslogtreecommitdiff
path: root/cpp/src/IceSSL/EndpointI.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2009-10-22 16:17:29 -0700
committerMark Spruiell <mes@zeroc.com>2009-10-22 16:17:29 -0700
commit87f97134a630e50b81cf05b54f5df779c822f8bc (patch)
tree408e9d1503138c5fe85168e713106c3a70644d93 /cpp/src/IceSSL/EndpointI.cpp
parentBug 4198 - chat demo does not deal with Glacier2 crashing (diff)
downloadice-87f97134a630e50b81cf05b54f5df779c822f8bc.tar.bz2
ice-87f97134a630e50b81cf05b54f5df779c822f8bc.tar.xz
ice-87f97134a630e50b81cf05b54f5df779c822f8bc.zip
fixing VC6 compilation failures
Diffstat (limited to 'cpp/src/IceSSL/EndpointI.cpp')
-rw-r--r--cpp/src/IceSSL/EndpointI.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/cpp/src/IceSSL/EndpointI.cpp b/cpp/src/IceSSL/EndpointI.cpp
index 78c76c10b79..f57bf054f90 100644
--- a/cpp/src/IceSSL/EndpointI.cpp
+++ b/cpp/src/IceSSL/EndpointI.cpp
@@ -227,19 +227,26 @@ IceSSL::EndpointI::toString() const
return s.str();
}
-Ice::EndpointInfoPtr
-IceSSL::EndpointI::getInfo() const
+//
+// COMPILERFIX: VC6 complains about an ambiguous "EndpointInfo" symbol when this class is defined inside
+// getInfo(). Moving the definition into an anonymous namespace works around it.
+//
+namespace
{
class InfoI : public IceSSL::EndpointInfo
{
public:
- InfoI(Ice::Int to, bool comp, const string& host, Ice::Int port) :
+ InfoI(Int to, bool comp, const string& host, Int port) :
+#if defined(_MSC_VER) && (_MSC_VER < 1300) // VC++ 6 compiler bug
+ IceSSL::EndpointInfo(to, comp, host, port)
+#else
EndpointInfo(to, comp, host, port)
+#endif
{
}
- virtual Ice::Short
+ virtual Short
type() const
{
return EndpointType;
@@ -257,7 +264,11 @@ IceSSL::EndpointI::getInfo() const
return true;
}
};
+}
+Ice::EndpointInfoPtr
+IceSSL::EndpointI::getInfo() const
+{
return new InfoI(_timeout, _compress, _host, _port);
}
@@ -499,7 +510,7 @@ IceSSL::EndpointI::operator<(const Ice::LocalObject& r) const
Ice::Int
IceSSL::EndpointI::hashInit() const
{
- Ice::Int h = 0;
+ Int h = 0;
IceInternal::hashAdd(h, _host);
IceInternal::hashAdd(h, _port);
IceInternal::hashAdd(h, _timeout);