[mlpack] 308/324: Return *this for operator--().

Barak A. Pearlmutter barak+git at cs.nuim.ie
Sun Aug 17 08:22:21 UTC 2014


This is an automated email from the git hooks/post-receive script.

bap pushed a commit to branch svn-trunk
in repository mlpack.

commit 040918d74ecde356c23c8de3a5ab0a74c6585cb0
Author: rcurtin <rcurtin at 9d5b8971-822b-0410-80eb-d18c1038ef23>
Date:   Mon Aug 11 19:47:02 2014 +0000

    Return *this for operator--().
    
    
    git-svn-id: http://svn.cc.gatech.edu/fastlab/mlpack/trunk@17000 9d5b8971-822b-0410-80eb-d18c1038ef23
---
 src/mlpack/core/arma_extend/Mat_extra_meat.hpp | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/mlpack/core/arma_extend/Mat_extra_meat.hpp b/src/mlpack/core/arma_extend/Mat_extra_meat.hpp
index 0bf1f6c..85585af 100644
--- a/src/mlpack/core/arma_extend/Mat_extra_meat.hpp
+++ b/src/mlpack/core/arma_extend/Mat_extra_meat.hpp
@@ -28,8 +28,8 @@ Mat<eT>::const_row_col_iterator::const_row_col_iterator(const const_row_iterator
     : M(&it.M), current_pos(&it.M(it.row, it.col)), internal_col(it.col), internal_row(it.row)
   {
   // Nothing to do.
-  } 
-  
+  }
+
 
 
 template<typename eT>
@@ -99,6 +99,8 @@ Mat<eT>::const_row_col_iterator::operator--()
     internal_col--;
     internal_row = M->n_rows - 1;
     }
+
+  return *this;
   }
 
 
@@ -176,7 +178,7 @@ Mat<eT>::const_row_col_iterator::operator==(const iterator& rhs) const
   {
   return (rhs == current_pos);
   }
-  
+
 
 
 template<typename eT>
@@ -212,7 +214,7 @@ Mat<eT>::const_row_col_iterator::operator==(const row_iterator& rhs) const
   {
   return (&rhs.M(rhs.row, rhs.col) == current_pos);
   }
-  
+
 
 
 template<typename eT>
@@ -305,6 +307,8 @@ Mat<eT>::row_col_iterator::operator--()
     internal_col--;
     internal_row = M->n_rows - 1;
     }
+
+  return *this;
   }
 
 
@@ -318,7 +322,7 @@ Mat<eT>::row_col_iterator::operator--(int)
   --(*this);
 
   return temp;
-  } 
+  }
 
 
 
@@ -327,7 +331,7 @@ inline bool
 Mat<eT>::row_col_iterator::operator==(const const_row_col_iterator& rhs) const
   {
   return (rhs.current_pos == current_pos);
-  } 
+  }
 
 
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/mlpack.git



More information about the debian-science-commits mailing list