[PPL-devel] [GIT] ppl/ppl(master): FIXME resolved.

Roberto Bagnara bagnara at cs.unipr.it
Wed Apr 1 21:14:08 CEST 2009


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

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Wed Apr  1 21:13:44 2009 +0200

FIXME resolved.

---

 src/OR_Matrix.defs.hh    |    2 +-
 src/OR_Matrix.inlines.hh |   12 ++++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/OR_Matrix.defs.hh b/src/OR_Matrix.defs.hh
index 27a2ac0..0e3ceec 100644
--- a/src/OR_Matrix.defs.hh
+++ b/src/OR_Matrix.defs.hh
@@ -125,7 +125,7 @@ private:
     //! Subscript operator.
     U& operator[](dimension_type k) const;
 
-    //! Default constructor: creates a past-the-end object.
+    //! Default constructor: creates an invalid object that has to be assigned.
     Pseudo_Row();
 
     //! Assignment operator.
diff --git a/src/OR_Matrix.inlines.hh b/src/OR_Matrix.inlines.hh
index 34aecf1..4315e56 100644
--- a/src/OR_Matrix.inlines.hh
+++ b/src/OR_Matrix.inlines.hh
@@ -131,6 +131,10 @@ OR_Matrix<T>::any_row_iterator<U>
     e(n_rows)
     // Field `i' is intentionally not initialized here.
 {
+#if PPL_OR_MATRIX_EXTRA_DEBUG
+  // Turn `value' into a valid object.
+  value.size_ = OR_Matrix::row_size(e);
+#endif
 }
 
 template <typename T>
@@ -188,12 +192,13 @@ inline typename OR_Matrix<T>::template any_row_iterator<U>&
 OR_Matrix<T>::any_row_iterator<U>::operator++() {
   ++e;
   dimension_type increment = e;
-  if (e % 2 != 0) {
+  if (e % 2 != 0)
     ++increment;
 #if PPL_OR_MATRIX_EXTRA_DEBUG
+  else {
     value.size_ += 2;
-#endif
   }
+#endif
   i += increment;
   value.first += increment;
   return *this;
@@ -245,8 +250,7 @@ OR_Matrix<T>::any_row_iterator<U>::operator+=(const difference_type m) {
   i += increment;
   value.first += increment;
 #if PPL_OR_MATRIX_EXTRA_DEBUG
-  // FIXME(0.10.1)!!!
-  value.size_ = OR_Matrix::row_size(e);
+  value.size_ += (m - m % 2);
 #endif
   return *this;
 }




More information about the PPL-devel mailing list