[Rcpp-commits] r1034 - pkg/Rcpp/inst/include/Rcpp

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Apr 12 22:23:57 CEST 2010


Author: dmbates
Date: 2010-04-12 22:23:57 +0200 (Mon, 12 Apr 2010)
New Revision: 1034

Modified:
   pkg/Rcpp/inst/include/Rcpp/Vector.h
Log:
nrows(), ncols(), rows() and cols() member functions are const


Modified: pkg/Rcpp/inst/include/Rcpp/Vector.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/Vector.h	2010-04-12 12:07:46 UTC (rev 1033)
+++ pkg/Rcpp/inst/include/Rcpp/Vector.h	2010-04-12 20:23:57 UTC (rev 1034)
@@ -562,18 +562,18 @@
      */
     inline R_len_t size() const { return ::Rf_length( Base::m_sexp ) ; }
     
-    inline int ncol(){
+    inline int ncol() const {
     	return dims()[1]; 
     }
     
-    inline int nrow(){
+    inline int nrow() const {
     	return dims()[0]; 
     }
 
-    inline int cols() { 
+    inline int cols() const { 
 	return dims()[1]; 
     }
-    inline int rows() { 
+    inline int rows() const { 
 	return dims()[0]; 
     }
 	



More information about the Rcpp-commits mailing list