[Rcpp-commits] r4532 - in pkg/Rcpp: . inst/include/Rcpp/sugar/functions

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Sep 23 04:43:40 CEST 2013


Author: edd
Date: 2013-09-23 04:43:39 +0200 (Mon, 23 Sep 2013)
New Revision: 4532

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/inst/include/Rcpp/sugar/functions/diff.h
Log:
correction to sugar function diff() as unearthed by package growcurves


Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2013-09-22 17:42:42 UTC (rev 4531)
+++ pkg/Rcpp/ChangeLog	2013-09-23 02:43:39 UTC (rev 4532)
@@ -1,3 +1,8 @@
+2013-09-22  Dirk Eddelbuettel  <edd at debian.org>
+
+	* inst/include/Rcpp/sugar/functions/diff.h: Declare set_previous
+	const and add a missing traits:: prefix before is_na
+
 2013-09-21  Dirk Eddelbuettel  <edd at debian.org>
 
 	* vignettes/Rcpp-modules.Rnw: Remove vignette-local compilations

Modified: pkg/Rcpp/inst/include/Rcpp/sugar/functions/diff.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/sugar/functions/diff.h	2013-09-22 17:42:42 UTC (rev 4531)
+++ pkg/Rcpp/inst/include/Rcpp/sugar/functions/diff.h	2013-09-23 02:43:39 UTC (rev 4532)
@@ -56,9 +56,9 @@
         return res ;
 	}     
 	
-	inline void set_previous(int i, STORAGE value){
+	inline void set_previous(int i, STORAGE value) const {
 	    previous = value ;
-	    was_na = is_na<RTYPE>(previous) ;
+	    was_na = traits::is_na<RTYPE>(previous) ;
 	    previous_index = i ;
 	}
 	



More information about the Rcpp-commits mailing list