[Rcpp-commits] r4303 - in pkg/Rcpp: . src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Apr 3 17:39:37 CEST 2013


Author: edd
Date: 2013-04-03 17:39:37 +0200 (Wed, 03 Apr 2013)
New Revision: 4303

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/src/Date.cpp
Log:
minor cleanup


Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2013-04-03 03:08:06 UTC (rev 4302)
+++ pkg/Rcpp/ChangeLog	2013-04-03 15:39:37 UTC (rev 4303)
@@ -1,7 +1,7 @@
 2013-04-02  Dirk Eddelbuettel  <edd at debian.org>
 
-	* src/Date.cpp (Rcpp): Corrected operator-() for Date and Datetime
-	objects to do what is more inline with C++ standard
+	* src/Date.cpp: Corrected operator-() for Date and Datetime objects
+	to behave more inline with C++ standard
 
 	* inst/include/Rcpp/Date.h: operator-() for Dates now returns a
 	double as the date itself is fractional double since epoch

Modified: pkg/Rcpp/src/Date.cpp
===================================================================
--- pkg/Rcpp/src/Date.cpp	2013-04-03 03:08:06 UTC (rev 4302)
+++ pkg/Rcpp/src/Date.cpp	2013-04-03 15:39:37 UTC (rev 4303)
@@ -167,14 +167,7 @@
 	return newdate;
     }
 
-    // int operator-(const Date& d1, const Date& d2) { return d2.m_d - d1.m_d; }
-    double operator-(const Date& d1, const Date& d2) {
-        //Rprintf( "d1 = %lf\n", d1.m_d ) ;
-        //Rprintf( "d2 = %lf\n", d2.m_d ) ;
-        double diff =  d1.m_d - d2.m_d;
-        //Rprintf( "diff = %lf\n", diff );
-        return diff ;
-    }
+    double operator-(const Date& d1, const Date& d2) { return d1.m_d - d2.m_d; }
     bool  operator<(const Date &d1, const Date& d2) { return d1.m_d < d2.m_d; }
     bool  operator>(const Date &d1, const Date& d2) { return d1.m_d > d2.m_d; }
     bool  operator==(const Date &d1, const Date& d2) { return d1.m_d == d2.m_d; }



More information about the Rcpp-commits mailing list