qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kp...@apache.org
Subject [1/2] qpid-cpp git commit: QPID-7676: Fixed C++11 dependency introduced when std::round(f) was used rahter than std::floor(f + 0.5)
Date Wed, 15 Feb 2017 17:34:06 GMT
Repository: qpid-cpp
Updated Branches:
  refs/heads/master 3d18b1ddb -> 9158a4acb


QPID-7676: Fixed C++11 dependency introduced when std::round(f) was used rahter than std::floor(f
+ 0.5)


Project: http://git-wip-us.apache.org/repos/asf/qpid-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-cpp/commit/6716fb43
Tree: http://git-wip-us.apache.org/repos/asf/qpid-cpp/tree/6716fb43
Diff: http://git-wip-us.apache.org/repos/asf/qpid-cpp/diff/6716fb43

Branch: refs/heads/master
Commit: 6716fb4345907184f0953caa3d9feb34aac49818
Parents: 13f0fe5
Author: Kim van der Riet <kpvdr@apache.org>
Authored: Wed Feb 15 12:33:06 2017 -0500
Committer: Kim van der Riet <kpvdr@apache.org>
Committed: Wed Feb 15 12:33:06 2017 -0500

----------------------------------------------------------------------
 src/qpid/linearstore/MessageStoreImpl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-cpp/blob/6716fb43/src/qpid/linearstore/MessageStoreImpl.cpp
----------------------------------------------------------------------
diff --git a/src/qpid/linearstore/MessageStoreImpl.cpp b/src/qpid/linearstore/MessageStoreImpl.cpp
index f84defc..940c04a 100644
--- a/src/qpid/linearstore/MessageStoreImpl.cpp
+++ b/src/qpid/linearstore/MessageStoreImpl.cpp
@@ -82,7 +82,7 @@ uint32_t MessageStoreImpl::chkJrnlWrPageCacheSize(const uint32_t param_,
const s
     } else if ( p < 4 ) {
         p = 4;
     } else if (p & (p-1)) {
-        p = std::pow(2, std::round(std::log2(p)));
+        p = std::pow(2, std::floor(std::log2(p) + 0.5));
         QLS_LOG(warning, "parameter " << paramName_ << " (" << param_ <<
") must be a power of 2 between 4 and 128; changing this parameter to closest allowable value
(" << p << ")");
     }
     return p;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message