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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 3 14:56:01 CET 2012


Author: romain
Date: 2012-12-03 14:56:01 +0100 (Mon, 03 Dec 2012)
New Revision: 4061

Modified:
   pkg/Rcpp/inst/include/Rcpp/String.h
Log:
const correctness of operators

Modified: pkg/Rcpp/inst/include/Rcpp/String.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/String.h	2012-12-03 13:21:19 UTC (rev 4060)
+++ pkg/Rcpp/inst/include/Rcpp/String.h	2012-12-03 13:56:01 UTC (rev 4061)
@@ -262,15 +262,15 @@
             return buffer_ready ? buffer.c_str() : CHAR(data) ;    
         }
         
-        bool operator<( const Rcpp::String& other ){
+        bool operator<( const Rcpp::String& other ) const {
             return strcmp( get_cstring(), other.get_cstring() ) < 0;   
         }
         
-        bool operator==( const Rcpp::String& other){
+        bool operator==( const Rcpp::String& other) const {
             return get_sexp() == other.get_sexp() ;   
         }
         
-        bool operator>( const Rcpp::String& other ){
+        bool operator>( const Rcpp::String& other ) const {
             return strcmp( get_cstring(), other.get_cstring() ) > 0;   
         }
         



More information about the Rcpp-commits mailing list