activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1446391 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/URIPool.cpp
Date Thu, 14 Feb 2013 23:19:20 GMT
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;
 }
 
 ////////////////////////////////////////////////////////////////////////////////



Mime
View raw message