summaryrefslogtreecommitdiff
path: root/cppe
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2007-05-02 15:35:51 +0000
committerBenoit Foucher <benoit@zeroc.com>2007-05-02 15:35:51 +0000
commit6f1f186e90f16fc544ca2ab21a2b72c38a63e1d8 (patch)
tree20101e3af74ad325e07ebfab56b0b013760f496e /cppe
parentFixed potential NPE (diff)
downloadice-6f1f186e90f16fc544ca2ab21a2b72c38a63e1d8.tar.bz2
ice-6f1f186e90f16fc544ca2ab21a2b72c38a63e1d8.tar.xz
ice-6f1f186e90f16fc544ca2ab21a2b72c38a63e1d8.zip
Added comparison operator for Communicator
Diffstat (limited to 'cppe')
-rwxr-xr-xcppe/include/IceE/CommunicatorF.h8
-rwxr-xr-xcppe/include/IceE/ConnectionF.h10
-rwxr-xr-xcppe/include/IceE/ObjectAdapterF.h10
-rwxr-xr-xcppe/src/IceE/Connection.cpp12
-rw-r--r--cppe/src/IceE/ObjectAdapter.cpp12
-rwxr-xr-xcppe/src/IceE/OutgoingConnectionFactory.h2
6 files changed, 25 insertions, 29 deletions
diff --git a/cppe/include/IceE/CommunicatorF.h b/cppe/include/IceE/CommunicatorF.h
index 34c4b9fb8d2..1ff53fb9ff5 100755
--- a/cppe/include/IceE/CommunicatorF.h
+++ b/cppe/include/IceE/CommunicatorF.h
@@ -17,6 +17,14 @@ namespace Ice
{
class Communicator;
+inline bool operator==(const Communicator& l, const Communicator& r)
+{
+ return &l == &r;
+}
+inline bool operator<(const Communicator& l, const Communicator& r)
+{
+ return &l < &r;
+}
}
diff --git a/cppe/include/IceE/ConnectionF.h b/cppe/include/IceE/ConnectionF.h
index 33bf805eab3..5749cd9c944 100755
--- a/cppe/include/IceE/ConnectionF.h
+++ b/cppe/include/IceE/ConnectionF.h
@@ -17,8 +17,14 @@ namespace Ice
{
class Connection;
-ICE_API bool operator==(const Connection&, const Connection&);
-ICE_API bool operator<(const Connection&, const Connection&);
+inline bool operator==(const Connection& l, const Connection& r)
+{
+ return &l == &r;
+}
+inline bool operator<(const Connection& l, const Connection& r)
+{
+ return &l < &r;
+}
}
diff --git a/cppe/include/IceE/ObjectAdapterF.h b/cppe/include/IceE/ObjectAdapterF.h
index d95a03048a1..ed4ea70b395 100755
--- a/cppe/include/IceE/ObjectAdapterF.h
+++ b/cppe/include/IceE/ObjectAdapterF.h
@@ -17,8 +17,14 @@ namespace Ice
{
class ObjectAdapter;
-ICE_API bool operator==(const ObjectAdapter&, const ObjectAdapter&);
-ICE_API bool operator<(const ObjectAdapter&, const ObjectAdapter&);
+inline bool operator==(const ObjectAdapter& l, const ObjectAdapter& r)
+{
+ return &l == &r;
+}
+inline bool operator<(const ObjectAdapter& l, const ObjectAdapter& r)
+{
+ return &l < &r;
+}
}
diff --git a/cppe/src/IceE/Connection.cpp b/cppe/src/IceE/Connection.cpp
index db69e10e014..4814c531370 100755
--- a/cppe/src/IceE/Connection.cpp
+++ b/cppe/src/IceE/Connection.cpp
@@ -34,18 +34,6 @@ using namespace IceInternal;
IceUtil::Shared* IceInternal::upCast(Connection* p) { return p; }
-bool
-Ice::operator==(const Connection& l, const Connection& r)
-{
- return &l == &r;
-}
-
-bool
-Ice::operator<(const Connection& l, const Connection& r)
-{
- return &l < &r;
-}
-
void
Ice::Connection::waitForValidation()
{
diff --git a/cppe/src/IceE/ObjectAdapter.cpp b/cppe/src/IceE/ObjectAdapter.cpp
index 5a46d3353cc..cc44d174014 100644
--- a/cppe/src/IceE/ObjectAdapter.cpp
+++ b/cppe/src/IceE/ObjectAdapter.cpp
@@ -37,18 +37,6 @@ using namespace std;
using namespace Ice;
using namespace IceInternal;
-bool
-Ice::operator==(const ::Ice::ObjectAdapter& l, const ::Ice::ObjectAdapter& r)
-{
- return &l == &r;
-}
-
-bool
-Ice::operator<(const ::Ice::ObjectAdapter& l, const ::Ice::ObjectAdapter& r)
-{
- return &l < &r;
-}
-
IceUtil::Shared* IceInternal::upCast(::Ice::ObjectAdapter* p) { return p; }
string
diff --git a/cppe/src/IceE/OutgoingConnectionFactory.h b/cppe/src/IceE/OutgoingConnectionFactory.h
index 3689f108f4c..f0c9d7c1c16 100755
--- a/cppe/src/IceE/OutgoingConnectionFactory.h
+++ b/cppe/src/IceE/OutgoingConnectionFactory.h
@@ -17,7 +17,7 @@
#include <IceE/EndpointF.h>
#ifdef ICEE_HAS_ROUTER
# include <IceE/RouterInfoF.h>
-#endif
+#endif
#include <IceE/Shared.h>
#include <IceE/Mutex.h>
#include <IceE/Monitor.h>