diff options
author | Paolo Carlini <pcarlini@suse.de> | 2006-09-08 14:40:47 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2006-09-08 14:40:47 +0000 |
commit | 96b9f9a4d84511ca59ebd763dc7128ab9013a9d0 (patch) | |
tree | fd859e1b53698cc7e2af5ee987361498e4050a72 /libstdc++-v3/include/tr1 | |
parent | df20ea24f939e8d2b005d2ef985446b2fe0cf597 (diff) | |
download | gcc-96b9f9a4d84511ca59ebd763dc7128ab9013a9d0.tar.gz |
random.tcc (poisson_distribution<>::operator()): Avoid potential warnings when _IntType is unsigned.
2006-09-08 Paolo Carlini <pcarlini@suse.de>
* include/tr1/random.tcc (poisson_distribution<>::operator()):
Avoid potential warnings when _IntType is unsigned.
From-SVN: r116779
Diffstat (limited to 'libstdc++-v3/include/tr1')
-rw-r--r-- | libstdc++-v3/include/tr1/random.tcc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/include/tr1/random.tcc b/libstdc++-v3/include/tr1/random.tcc index e6d4d941d59..a7322605f68 100644 --- a/libstdc++-v3/include/tr1/random.tcc +++ b/libstdc++-v3/include/tr1/random.tcc @@ -906,7 +906,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) else #endif { - _IntType __x = -1; + _IntType __x = 0; _RealType __prod = 1.0; do @@ -916,7 +916,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) } while (__prod > _M_lm_thr); - return __x; + return __x - 1; } } |