[GIT] ppl/ppl(master): Fixed a bug ( that is inconsequential for the current code base).

Module: ppl/ppl Branch: master Commit: 8a076d885da533a2211f32b80b45d932c7412cd5 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=8a076d885da53...
Author: Roberto Bagnara bagnara@cs.unipr.it Date: Mon Mar 23 18:30:42 2009 +0100
Fixed a bug (that is inconsequential for the current code base). We were using `m % 2 == 1' instead of `m % 2 != 0', with `m' a signed number that could be negative.
---
src/OR_Matrix.inlines.hh | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/OR_Matrix.inlines.hh b/src/OR_Matrix.inlines.hh index cb62cb9..d825159 100644 --- a/src/OR_Matrix.inlines.hh +++ b/src/OR_Matrix.inlines.hh @@ -239,7 +239,7 @@ template <typename U> inline typename OR_Matrix<T>::template any_row_iterator<U>& OR_Matrix<T>::any_row_iterator<U>::operator+=(const difference_type m) { difference_type increment = m + m*m/2 + m*e; - if (e%2 == 0 && m%2 == 1) + if (e % 2 == 0 && m % 2 != 0) ++increment; e += m; i += increment;
participants (1)
-
Roberto Bagnara