summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/RouterInfo.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2016-08-26 16:15:37 -0400
committerBernard Normier <bernard@zeroc.com>2016-08-26 16:15:37 -0400
commitf7fe523fee0e828b781b9dc010bb0f80ea22853a (patch)
treeffd913f8c16a56e579dd6f5f97eca08625d3418d /cpp/src/Ice/RouterInfo.cpp
parentFix java-compat typo in TestUtil.py (diff)
downloadice-f7fe523fee0e828b781b9dc010bb0f80ea22853a.tar.bz2
ice-f7fe523fee0e828b781b9dc010bb0f80ea22853a.tar.xz
ice-f7fe523fee0e828b781b9dc010bb0f80ea22853a.zip
Fixed proxy comparison in C++11
Diffstat (limited to 'cpp/src/Ice/RouterInfo.cpp')
-rw-r--r--cpp/src/Ice/RouterInfo.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/cpp/src/Ice/RouterInfo.cpp b/cpp/src/Ice/RouterInfo.cpp
index c5c7b4c5df6..b205b057d7a 100644
--- a/cpp/src/Ice/RouterInfo.cpp
+++ b/cpp/src/Ice/RouterInfo.cpp
@@ -47,15 +47,15 @@ IceInternal::RouterManager::get(const RouterPrxPtr& rtr)
return 0;
}
- RouterPrxPtr router = ICE_UNCHECKED_CAST(RouterPrx, rtr->ice_router(0)); // The router cannot be routed.
+ RouterPrxPtr router = rtr->ice_router(0); // The router cannot be routed.
IceUtil::Mutex::Lock sync(*this);
- map<RouterPrxPtr, RouterInfoPtr>::iterator p = _table.end();
+ RouterInfoTable::iterator p = _table.end();
if(_tableHint != _table.end())
{
- if(_tableHint->first == router)
+ if(targetEqualTo(_tableHint->first, router))
{
p = _tableHint;
}
@@ -87,8 +87,8 @@ IceInternal::RouterManager::erase(const RouterPrxPtr& rtr)
RouterPrxPtr router = ICE_UNCHECKED_CAST(RouterPrx, rtr->ice_router(ICE_NULLPTR)); // The router cannot be routed.
IceUtil::Mutex::Lock sync(*this);
- map<RouterPrxPtr, RouterInfoPtr>::iterator p = _table.end();
- if(_tableHint != _table.end() && _tableHint->first == router)
+ RouterInfoTable::iterator p = _table.end();
+ if(_tableHint != _table.end() && targetEqualTo(_tableHint->first, router))
{
p = _tableHint;
_tableHint = _table.end();
@@ -129,21 +129,13 @@ IceInternal::RouterInfo::destroy()
bool
IceInternal::RouterInfo::operator==(const RouterInfo& rhs) const
{
-#ifdef ICE_CPP11_MAPPING
return Ice::targetEqualTo(_router, rhs._router);
-#else
- return _router == rhs._router;
-#endif
}
bool
IceInternal::RouterInfo::operator<(const RouterInfo& rhs) const
{
-#ifdef ICE_CPP11_MAPPING
return Ice::targetLess(_router, rhs._router);
-#else
- return _router < rhs._router;
-#endif
}
vector<EndpointIPtr>