Commit 96b9f9a4 by Paolo Carlini Committed by Paolo Carlini

random.tcc (poisson_distribution<>::operator()): Avoid potential warnings when…

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
parent df20ea24
2006-09-08 Paolo Carlini <pcarlini@suse.de>
* include/tr1/random.tcc (poisson_distribution<>::operator()):
Avoid potential warnings when _IntType is unsigned.
2006-09-08 Benjamin Kosnik <bkoz@redhat.com> 2006-09-08 Benjamin Kosnik <bkoz@redhat.com>
* include/debug/debug.h (_GLIBCXX_DEBUG_ONLY): New. * include/debug/debug.h (_GLIBCXX_DEBUG_ONLY): New.
......
...@@ -906,7 +906,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -906,7 +906,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
else else
#endif #endif
{ {
_IntType __x = -1; _IntType __x = 0;
_RealType __prod = 1.0; _RealType __prod = 1.0;
do do
...@@ -916,7 +916,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1) ...@@ -916,7 +916,7 @@ _GLIBCXX_BEGIN_NAMESPACE(tr1)
} }
while (__prod > _M_lm_thr); while (__prod > _M_lm_thr);
return __x; return __x - 1;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment