aboutsummaryrefslogtreecommitdiff
path: root/system/include/libcxx/random
diff options
context:
space:
mode:
authorBruce Mitchener <bruce.mitchener@gmail.com>2013-08-08 15:29:07 +0700
committerBruce Mitchener <bruce.mitchener@gmail.com>2013-08-09 09:53:12 +0700
commit6f894d481d19e05fbc10f3ce7d74d9180d1cbb64 (patch)
tree8260bbd04f17fbee780c654b35175e89c10129fa /system/include/libcxx/random
parent6c275bebb45d6aac7e4a024b825ab34971b178d2 (diff)
Update libcxx to revision 187959, 2013-08-08.
Diffstat (limited to 'system/include/libcxx/random')
-rw-r--r--system/include/libcxx/random31
1 files changed, 2 insertions, 29 deletions
diff --git a/system/include/libcxx/random b/system/include/libcxx/random
index 92722ea6..2e7a4854 100644
--- a/system/include/libcxx/random
+++ b/system/include/libcxx/random
@@ -1880,7 +1880,7 @@ public:
seed(_Sseq& __q)
{__seed(__q, integral_constant<unsigned,
1 + (__m == 0 ? (sizeof(result_type) * __CHAR_BIT__ - 1)/32
- : (__m-1) / 0x100000000ull)>());}
+ : (__m > 0x100000000ull))>());}
// generating functions
_LIBCPP_INLINE_VISIBILITY
@@ -1969,37 +1969,10 @@ linear_congruential_engine<_UIntType, __a, __c, __m>::__seed(_Sseq& __q,
uint32_t __ar[__k+3];
__q.generate(__ar, __ar + __k + 3);
result_type __s = static_cast<result_type>((__ar[3] +
- (uint64_t)__ar[4] << 32) % __m);
+ ((uint64_t)__ar[4] << 32)) % __m);
__x_ = __c == 0 && __s == 0 ? result_type(1) : __s;
}
-template <class _CharT, class _Traits>
-class __save_flags
-{
- typedef basic_ios<_CharT, _Traits> __stream_type;
- typedef typename __stream_type::fmtflags fmtflags;
-
- __stream_type& __stream_;
- fmtflags __fmtflags_;
- _CharT __fill_;
-
- __save_flags(const __save_flags&);
- __save_flags& operator=(const __save_flags&);
-public:
- _LIBCPP_INLINE_VISIBILITY
- explicit __save_flags(__stream_type& __stream)
- : __stream_(__stream),
- __fmtflags_(__stream.flags()),
- __fill_(__stream.fill())
- {}
- _LIBCPP_INLINE_VISIBILITY
- ~__save_flags()
- {
- __stream_.flags(__fmtflags_);
- __stream_.fill(__fill_);
- }
-};
-
template <class _CharT, class _Traits,
class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
inline _LIBCPP_INLINE_VISIBILITY