summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/random/detail/large_arithmetic.hpp')
-rw-r--r--3rdParty/Boost/src/boost/random/detail/large_arithmetic.hpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/3rdParty/Boost/src/boost/random/detail/large_arithmetic.hpp b/3rdParty/Boost/src/boost/random/detail/large_arithmetic.hpp
index 24177dc..66f6b4e 100644
--- a/3rdParty/Boost/src/boost/random/detail/large_arithmetic.hpp
+++ b/3rdParty/Boost/src/boost/random/detail/large_arithmetic.hpp
@@ -7,7 +7,7 @@
*
* See http://www.boost.org for most recent version including documentation.
*
- * $Id: large_arithmetic.hpp 71018 2011-04-05 21:27:52Z steven_watanabe $
+ * $Id$
*/
#ifndef BOOST_RANDOM_DETAIL_LARGE_ARITHMETIC_HPP
@@ -31,9 +31,9 @@ struct div_t {
inline div_t muldivmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t m)
{
- static const int bits =
+ const int bits =
::std::numeric_limits< ::boost::uintmax_t>::digits / 2;
- static const ::boost::uintmax_t mask = (::boost::uintmax_t(1) << bits) - 1;
+ const ::boost::uintmax_t mask = (::boost::uintmax_t(1) << bits) - 1;
typedef ::boost::uint_t<bits>::fast digit_t;
int shift = std::numeric_limits< ::boost::uintmax_t>::digits - 1
@@ -96,8 +96,8 @@ inline div_t muldivmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t
quotient[i - 2] = q;
product[i] = 0;
- product[i-1] = (rem >> bits) & mask;
- product[i-2] = rem & mask;
+ product[i-1] = static_cast<digit_t>((rem >> bits) & mask);
+ product[i-2] = static_cast<digit_t>(rem & mask);
}
div_t result = {