From 96d1e8dafda747736696cf4eb5c7720b4adebc2f Mon Sep 17 00:00:00 2001 From: bthomee Date: Fri, 4 Apr 2025 12:32:46 +0000 Subject: [PATCH] deploy: 851d99d99e9015d2d9918df56b01885bae5234e5 --- mulDiv_8cpp_source.html | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/mulDiv_8cpp_source.html b/mulDiv_8cpp_source.html index bb79c14535..cd08858b83 100644 --- a/mulDiv_8cpp_source.html +++ b/mulDiv_8cpp_source.html @@ -109,20 +109,18 @@ $(function() {
31std::optional<std::uint64_t>
32mulDiv(std::uint64_t value, std::uint64_t mul, std::uint64_t div)
33{
-
34 using namespace boost::multiprecision;
-
35
-
36 uint128_t result;
-
37 result = multiply(result, value, mul);
+
34 boost::multiprecision::uint128_t result;
+
35 result = multiply(result, value, mul);
+
36
+
37 result /= div;
38
-
39 result /= div;
-
40
-
41 if (result > ripple::muldiv_max)
-
42 return std::nullopt;
-
43
-
44 return static_cast<std::uint64_t>(result);
-
45}
-
46
-
47} // namespace ripple
+
39 if (result > ripple::muldiv_max)
+
40 return std::nullopt;
+
41
+
42 return static_cast<std::uint64_t>(result);
+
43}
+
44
+
45} // namespace ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition: algorithm.h:26