From 3651781ef826282b875a3b408f76b3701cf00a2b Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 5 Nov 2010 16:03:18 +0000 Subject: Avoid cast warnings --- src/pubkey/workfactor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pubkey/workfactor.cpp') diff --git a/src/pubkey/workfactor.cpp b/src/pubkey/workfactor.cpp index a4d670c82..f3d5d164a 100644 --- a/src/pubkey/workfactor.cpp +++ b/src/pubkey/workfactor.cpp @@ -34,14 +34,14 @@ size_t dl_work_factor(size_t bits) return 190; return 256; #else - const size_t MIN_ESTIMATE = 64; + const double MIN_ESTIMATE = 64; const double log_x = bits / 1.44; const double strength = 2.76 * std::pow(log_x, 1.0/3.0) * std::pow(std::log(log_x), 2.0/3.0); - return std::max(strength, MIN_ESTIMATE); + return static_cast(std::max(strength, MIN_ESTIMATE)); #endif } -- cgit v1.2.3