[PPL-devel] [GIT] ppl/ppl(master): Sparse_Row: weaken the lower_bound() requirements on the argument.

Marco Poletti poletti.marco at gmail.com
Mon Sep 20 08:57:49 CEST 2010


Module: ppl/ppl
Branch: master
Commit: 1ac324043fc85fee09587c2a3aea3228732dd582
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=1ac324043fc85fee09587c2a3aea3228732dd582

Author: Marco Poletti <poletti.marco at gmail.com>
Date:   Mon Sep 20 08:57:39 2010 +0200

Sparse_Row: weaken the lower_bound() requirements on the argument.

---

 src/Sparse_Row.inlines.hh |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Sparse_Row.inlines.hh b/src/Sparse_Row.inlines.hh
index babd074..ec75549 100644
--- a/src/Sparse_Row.inlines.hh
+++ b/src/Sparse_Row.inlines.hh
@@ -226,7 +226,7 @@ Sparse_Row::find(const_iterator hint, dimension_type i) const {
 
 inline Sparse_Row::iterator
 Sparse_Row::lower_bound(dimension_type i) {
-  PPL_ASSERT(i < size());
+  PPL_ASSERT(i <= size());
 
   iterator itr = tree.bisect(i);
 
@@ -243,7 +243,7 @@ Sparse_Row::lower_bound(dimension_type i) {
 
 inline Sparse_Row::iterator
 Sparse_Row::lower_bound(iterator hint, dimension_type i) {
-  PPL_ASSERT(i < size());
+  PPL_ASSERT(i <= size());
 
   iterator itr = tree.bisect_near(hint, i);
 
@@ -260,7 +260,7 @@ Sparse_Row::lower_bound(iterator hint, dimension_type i) {
 
 inline Sparse_Row::const_iterator
 Sparse_Row::lower_bound(dimension_type i) const {
-  PPL_ASSERT(i < size());
+  PPL_ASSERT(i <= size());
 
   const_iterator itr = tree.bisect(i);
 
@@ -277,7 +277,7 @@ Sparse_Row::lower_bound(dimension_type i) const {
 
 inline Sparse_Row::const_iterator
 Sparse_Row::lower_bound(const_iterator hint, dimension_type i) const {
-  PPL_ASSERT(i < size());
+  PPL_ASSERT(i <= size());
 
   const_iterator itr = tree.bisect_near(hint, i);
 




More information about the PPL-devel mailing list