aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey')
-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
}