[GIT] ppl/ppl(sparse_matrices): CO_Tree: fix compilation with --enable-assertions and without --enable-more-assertions .

Module: ppl/ppl Branch: sparse_matrices Commit: 47946c5bb7c62d151a18dcaaa3922da5f62e88e3 URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=47946c5bb7c62...
Author: Marco Poletti poletti.marco@gmail.com Date: Tue Aug 31 18:49:57 2010 +0200
CO_Tree: fix compilation with --enable-assertions and without --enable-more-assertions.
---
src/CO_Tree.inlines.hh | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/CO_Tree.inlines.hh b/src/CO_Tree.inlines.hh index 7225442..ce20bb6 100644 --- a/src/CO_Tree.inlines.hh +++ b/src/CO_Tree.inlines.hh @@ -435,7 +435,9 @@ CO_Tree::const_iterator::operator*() const { PPL_ASSERT(current_index != 0); PPL_ASSERT(current_data != 0); PPL_ASSERT(OK()); +#if PPL_CO_TREE_EXTRA_DEBUG PPL_ASSERT(current_index != &(tree->indexes[tree->reserved_size + 1])); +#endif return std::pair<const dimension_type&, const data_type&>(*current_index, *current_data); } @@ -445,7 +447,9 @@ CO_Tree::const_iterator::operator->() const { PPL_ASSERT(current_index != 0); PPL_ASSERT(current_data != 0); PPL_ASSERT(OK()); +#if PPL_CO_TREE_EXTRA_DEBUG PPL_ASSERT(current_index != &(tree->indexes[tree->reserved_size + 1])); +#endif return Const_Member_Access_Helper(*current_index, *current_data); }
@@ -608,7 +612,9 @@ CO_Tree::iterator::operator*() { PPL_ASSERT(current_index != 0); PPL_ASSERT(current_data != 0); PPL_ASSERT(OK()); +#if PPL_CO_TREE_EXTRA_DEBUG PPL_ASSERT(current_index != &(tree->indexes[tree->reserved_size + 1])); +#endif return std::pair<const dimension_type, data_type&>(*current_index, *current_data); } @@ -618,7 +624,9 @@ CO_Tree::iterator::operator*() const { PPL_ASSERT(current_index != 0); PPL_ASSERT(current_data != 0); PPL_ASSERT(OK()); +#if PPL_CO_TREE_EXTRA_DEBUG PPL_ASSERT(current_index != &(tree->indexes[tree->reserved_size + 1])); +#endif return std::pair<const dimension_type, const data_type&>(*current_index, *current_data); } @@ -628,7 +636,9 @@ CO_Tree::iterator::operator->() { PPL_ASSERT(current_index != 0); PPL_ASSERT(current_data != 0); PPL_ASSERT(OK()); +#if PPL_CO_TREE_EXTRA_DEBUG PPL_ASSERT(current_index != &(tree->indexes[tree->reserved_size + 1])); +#endif return Member_Access_Helper(*current_index, *current_data); }
@@ -637,7 +647,9 @@ CO_Tree::iterator::operator->() const { PPL_ASSERT(current_index != 0); PPL_ASSERT(current_data != 0); PPL_ASSERT(OK()); +#if PPL_CO_TREE_EXTRA_DEBUG PPL_ASSERT(current_index != &(tree->indexes[tree->reserved_size + 1])); +#endif return Const_Member_Access_Helper(*current_index, *current_data); }
participants (1)
-
Marco Poletti