You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2013/02/15 00:19:20 UTC
svn commit: r1446391 -
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.cpp
Author: tabish
Date: Thu Feb 14 23:19:19 2013
New Revision: 1446391
URL: http://svn.apache.org/r1446391
Log:
clear a couple warnings
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.cpp
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.cpp?rev=1446391&r1=1446390&r2=1446391&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.cpp Thu Feb 14 23:19:19 2013
@@ -114,20 +114,22 @@ bool URIPool::removeURI(const URI& uri)
////////////////////////////////////////////////////////////////////////////////
bool URIPool::contains(const decaf::net::URI& uri) const {
+ bool result = false;
synchronized(&uriPool) {
- return uriPool.contains(uri);
+ result = uriPool.contains(uri);
}
+
+ return result;
}
////////////////////////////////////////////////////////////////////////////////
bool URIPool::isPriority(const decaf::net::URI& uri) const {
synchronized(&uriPool) {
- if (uriPool.isEmpty()) {
- return false;
+ if (!uriPool.isEmpty()) {
+ return uriPool.getFirst().equals(uri);
}
-
- return uriPool.getFirst().equals(uri);
}
+ return false;
}
////////////////////////////////////////////////////////////////////////////////