[GIT] ppl/ppl(master): Avoid implicit conversion changing type signedness.

Module: ppl/ppl Branch: master Commit: 9fd12191d4f7912e12b5f3965be1b69a52787d04 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=9fd12191d4f79...
Author: Enea Zaffanella zaffanella@cs.unipr.it Date: Fri Feb 24 16:55:58 2012 +0100
Avoid implicit conversion changing type signedness. Detected by ECLAIR service utypflag.
---
src/Octagonal_Shape.templates.hh | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/Octagonal_Shape.templates.hh b/src/Octagonal_Shape.templates.hh index a18e48f..84dc855 100644 --- a/src/Octagonal_Shape.templates.hh +++ b/src/Octagonal_Shape.templates.hh @@ -3403,10 +3403,12 @@ Octagonal_Shape<T>::remove_space_dimensions(const Variables_Set& vars) { // We consider each variable and we check if it has to be removed. // If it has to be removed, we pass to the next one, then we will // overwrite its representation in the matrix. + typedef typename OR_Matrix<N>::element_iterator Elem_Iter; + typedef typename std::iterator_traits<Elem_Iter>::difference_type diff_t; + dimension_type first = *vars.begin(); - dimension_type first_size = 2*first*(first + 1); - typename OR_Matrix<N>::element_iterator - iter = matrix.element_begin() + first_size; + const dimension_type first_size = 2 * first * (first + 1); + Elem_Iter iter = matrix.element_begin() + static_cast<diff_t>(first_size);
for (dimension_type i = first + 1; i < space_dim; ++i) { if (vars.count(i) == 0) {
participants (1)
-
Enea Zaffanella