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
This commit is contained in:
Paolo Carlini 2006-09-08 14:40:47 +00:00 committed by Paolo Carlini
parent df20ea24f9
commit 96b9f9a4d8
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
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>
* include/debug/debug.h (_GLIBCXX_DEBUG_ONLY): New.

View file

@ -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;
}
}