aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-11-05 16:03:18 +0000
committerlloyd <[email protected]>2010-11-05 16:03:18 +0000
commit3651781ef826282b875a3b408f76b3701cf00a2b (patch)
tree4be5658b0f55f2f28196576977db412d44797548 /src
parent5c1ca36f06ba06e2ba2e22efd7742571c8a7dcd3 (diff)
Avoid cast warnings
Diffstat (limited to 'src')
-rw-r--r--src/pubkey/workfactor.cpp4
1 files changed, 2 insertions, 2 deletions
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<size_t>(strength, MIN_ESTIMATE);
+ return static_cast<size_t>(std::max(strength, MIN_ESTIMATE));
#endif
}