diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2009-10-02 16:56:30 -0230 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2009-10-02 16:56:30 -0230 |
commit | 60015160ad9c3540c81d4281ebc0806a6281cace (patch) | |
tree | 3a52c3bdf6d1db4f6476b3522588521cd1eac3b7 /cpp | |
parent | Remove commented code (diff) | |
download | ice-60015160ad9c3540c81d4281ebc0806a6281cace.tar.bz2 ice-60015160ad9c3540c81d4281ebc0806a6281cace.tar.xz ice-60015160ad9c3540c81d4281ebc0806a6281cace.zip |
Resolve some BCC compiler warnings
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/src/Ice/EndpointI.h | 16 | ||||
-rw-r--r-- | cpp/src/Ice/OpaqueEndpointI.h | 21 | ||||
-rw-r--r-- | cpp/src/Ice/Selector.cpp | 1 | ||||
-rw-r--r-- | cpp/src/Ice/TcpEndpointI.h | 16 | ||||
-rw-r--r-- | cpp/src/Ice/UdpEndpointI.h | 16 | ||||
-rw-r--r-- | cpp/src/slice2cpp/Gen.cpp | 12 |
6 files changed, 81 insertions, 1 deletions
diff --git a/cpp/src/Ice/EndpointI.h b/cpp/src/Ice/EndpointI.h index 7b4b76fbf9b..a2e616ca176 100644 --- a/cpp/src/Ice/EndpointI.h +++ b/cpp/src/Ice/EndpointI.h @@ -143,6 +143,22 @@ public: virtual bool operator!=(const EndpointI&) const = 0; virtual bool operator<(const EndpointI&) const = 0; +#if defined(__BCPLUSPLUS__) + // + // COMPILERFIX: Avoid warnings about hiding members for C++Builder 2010 + // + // + virtual bool operator==(const Ice::LocalObject& rhs) const + { + return Ice::LocalObject::operator==(rhs); + } + + virtual bool operator<(const Ice::LocalObject& rhs) const + { + return Ice::LocalObject::operator<(rhs); + } +#endif + protected: virtual std::vector<ConnectorPtr> connectors(const std::vector<struct sockaddr_storage>&) const; diff --git a/cpp/src/Ice/OpaqueEndpointI.h b/cpp/src/Ice/OpaqueEndpointI.h index 0fa57b29070..d79b2433e02 100644 --- a/cpp/src/Ice/OpaqueEndpointI.h +++ b/cpp/src/Ice/OpaqueEndpointI.h @@ -48,6 +48,27 @@ public: virtual bool operator!=(const EndpointI&) const; virtual bool operator<(const EndpointI&) const; +#if defined(__BCPLUSPLUS__) + // + // COMPILERFIX: Avoid warnings about hiding members for C++Builder 2010 + // + // + virtual bool operator==(const Ice::LocalObject& rhs) const + { + return EndpointI::operator==(rhs); + } + + virtual bool operator<(const Ice::LocalObject& rhs) const + { + return EndpointI::operator<(rhs); + } + + virtual std::vector<ConnectorPtr> connectors(const std::vector<struct sockaddr_storage>& v) const + { + return EndpointI::connectors(v); + } +#endif + protected: using EndpointI::connectors; diff --git a/cpp/src/Ice/Selector.cpp b/cpp/src/Ice/Selector.cpp index aeb68e92006..471b4d686d5 100644 --- a/cpp/src/Ice/Selector.cpp +++ b/cpp/src/Ice/Selector.cpp @@ -59,7 +59,6 @@ Selector::initialize(EventHandler* handler) void Selector::update(EventHandler* handler, SocketOperation remove, SocketOperation add) { - SocketOperation previous = handler->_registered; handler->_registered = static_cast<SocketOperation>(handler->_registered & ~remove); handler->_registered = static_cast<SocketOperation>(handler->_registered | add); AsyncInfo* info = 0; diff --git a/cpp/src/Ice/TcpEndpointI.h b/cpp/src/Ice/TcpEndpointI.h index c689d078374..a905d6a5ffa 100644 --- a/cpp/src/Ice/TcpEndpointI.h +++ b/cpp/src/Ice/TcpEndpointI.h @@ -52,6 +52,22 @@ public: virtual bool operator!=(const EndpointI&) const; virtual bool operator<(const EndpointI&) const; +#if defined(__BCPLUSPLUS__) + // + // COMPILERFIX: Avoid warnings about hiding members for C++Builder 2010 + // + // + virtual bool operator==(const Ice::LocalObject& rhs) const + { + return EndpointI::operator==(rhs); + } + + virtual bool operator<(const Ice::LocalObject& rhs) const + { + return EndpointI::operator<(rhs); + } +#endif + private: virtual std::vector<ConnectorPtr> connectors(const std::vector<struct sockaddr_storage>&) const; diff --git a/cpp/src/Ice/UdpEndpointI.h b/cpp/src/Ice/UdpEndpointI.h index 74fa74a11a1..eb924d955d3 100644 --- a/cpp/src/Ice/UdpEndpointI.h +++ b/cpp/src/Ice/UdpEndpointI.h @@ -55,6 +55,22 @@ public: virtual bool operator!=(const EndpointI&) const; virtual bool operator<(const EndpointI&) const; +#if defined(__BCPLUSPLUS__) + // + // COMPILERFIX: Avoid warnings about hiding members for C++Builder 2010 + // + // + virtual bool operator==(const Ice::LocalObject& rhs) const + { + return EndpointI::operator==(rhs); + } + + virtual bool operator<(const Ice::LocalObject& rhs) const + { + return EndpointI::operator<(rhs); + } +#endif + private: virtual std::vector<ConnectorPtr> connectors(const std::vector<struct sockaddr_storage>&) const; diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp index 4f40b2ff6d1..7ba4f20251e 100644 --- a/cpp/src/slice2cpp/Gen.cpp +++ b/cpp/src/slice2cpp/Gen.cpp @@ -5667,6 +5667,18 @@ Slice::Gen::AsyncImplVisitor::visitOperation(const OperationPtr& p) if(!throws.empty()) { H << nl << "virtual void ice_exception(const ::std::exception&);"; + + H.zeroIndent(); + H << nl << "#if defined(__BCPLUSPLUS__)"; + H.restoreIndent(); + H << nl << "// COMPILERFIX: Avoid compiler warnings with C++Builder 2010"; + H << nl << "virtual void ice_exception()"; + H << sb; + H << nl << "::IceInternal::IncomingAsync::ice_exception();"; + H << eb; + H.zeroIndent(); + H << nl << "#endif"; + H.restoreIndent(); } H << eb << ';'; |