@@ -59,7 +59,7 @@ namespace Rcpp {
59
59
m_tm.tm_year = year - baseYear ();
60
60
}
61
61
double tmp = mktime00 (m_tm); // use mktime() replacement borrowed from R
62
- m_tm.tm_year += baseYear () ; // we'd rather keep it as a normal year
62
+ m_tm.tm_year += baseYear (); // we'd rather keep it as a normal year
63
63
m_d = tmp/(24 *60 *60 );
64
64
}
65
65
@@ -121,16 +121,16 @@ namespace Rcpp {
121
121
// needed to wrap containers of Date such as vector<Date> or map<string,Date>
122
122
namespace internal {
123
123
template <> inline double caster<Rcpp::Date,double >(Rcpp::Date from) {
124
- return static_cast <double >( from.getDate () ) ;
124
+ return static_cast <double >(from.getDate ()) ;
125
125
}
126
126
template <> inline Rcpp::Date caster<double ,Rcpp::Date>(double from) {
127
127
return Rcpp::Date (static_cast <int >(from));
128
128
}
129
129
}
130
130
131
131
template <> inline SEXP wrap_extra_steps<Rcpp::Date>(SEXP x) {
132
- Rf_setAttrib ( x, R_ClassSymbol, Rf_mkString (" Date" ));
133
- return x ;
132
+ Rf_setAttrib (x, R_ClassSymbol, Rf_mkString (" Date" ));
133
+ return x;
134
134
}
135
135
136
136
inline Date operator +(const Date &date, int offset) {
@@ -155,17 +155,17 @@ namespace Rcpp {
155
155
Shield<SEXP> datetimeclass (Rf_allocVector (STRSXP,2 ));
156
156
SET_STRING_ELT (datetimeclass, 0 , Rf_mkChar (" POSIXct" ));
157
157
SET_STRING_ELT (datetimeclass, 1 , Rf_mkChar (" POSIXt" ));
158
- return datetimeclass ;
158
+ return datetimeclass;
159
159
}
160
160
161
161
inline SEXP new_posixt_object ( double d) {
162
162
Shield<SEXP> x (Rf_ScalarReal (d));
163
163
Rf_setAttrib (x, R_ClassSymbol, getPosixClasses ());
164
- return x ;
164
+ return x;
165
165
}
166
166
167
167
inline SEXP new_date_object (double d) {
168
- Shield<SEXP> x (Rf_ScalarReal (d)) ;
168
+ Shield<SEXP> x (Rf_ScalarReal (d));
169
169
Rf_setAttrib (x, R_ClassSymbol, Rf_mkString (" Date" ));
170
170
return x;
171
171
}
0 commit comments