[PPL-devel] [GIT] ppl/ppl(master): Avoid explicit integral conversions that change the signedness of the underlying type of complex expressions .
Roberto Bagnara
bagnara at cs.unipr.it
Thu Nov 3 07:33:20 CET 2011
Module: ppl/ppl
Branch: master
Commit: 3ec1ffd46d745193932cd1c60c9b843a723c5e84
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=3ec1ffd46d745193932cd1c60c9b843a723c5e84
Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date: Thu Nov 3 07:33:09 2011 +0100
Avoid explicit integral conversions that change the signedness of the underlying type of complex expressions.
Detected by ECLAIR service utypflag.
---
src/CO_Tree.inlines.hh | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/CO_Tree.inlines.hh b/src/CO_Tree.inlines.hh
index 9ff72a7..fe0064e 100644
--- a/src/CO_Tree.inlines.hh
+++ b/src/CO_Tree.inlines.hh
@@ -31,7 +31,8 @@ CO_Tree::dfs_index(const_iterator itr) const {
PPL_ASSERT(itr.current_index != 0);
PPL_ASSERT(itr.current_index >= indexes + 1);
PPL_ASSERT(itr.current_index <= indexes + reserved_size);
- return static_cast<dimension_type>(itr.current_index - indexes);
+ const ptrdiff_t index = itr.current_index - indexes;
+ return static_cast<dimension_type>(index);
}
inline dimension_type
@@ -39,7 +40,8 @@ CO_Tree::dfs_index(iterator itr) const {
PPL_ASSERT(itr.current_index != 0);
PPL_ASSERT(itr.current_index >= indexes + 1);
PPL_ASSERT(itr.current_index <= indexes + reserved_size);
- return static_cast<dimension_type>(itr.current_index - indexes);
+ const ptrdiff_t index = itr.current_index - indexes;
+ return static_cast<dimension_type>(index);
}
inline
More information about the PPL-devel
mailing list