diff options
author | lloyd <[email protected]> | 2010-11-05 16:03:18 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-11-05 16:03:18 +0000 |
commit | 3651781ef826282b875a3b408f76b3701cf00a2b (patch) | |
tree | 4be5658b0f55f2f28196576977db412d44797548 /src/pubkey/workfactor.cpp | |
parent | 5c1ca36f06ba06e2ba2e22efd7742571c8a7dcd3 (diff) |
Avoid cast warnings
Diffstat (limited to 'src/pubkey/workfactor.cpp')
-rw-r--r-- | src/pubkey/workfactor.cpp | 4 |
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 } |