Skip to content

Commit f1d4711

Browse files
committed
white-space only: indentation, around operators/braces/function/function arguments, untabified
also added Emacs line and update Copyright year
1 parent 5f2e89f commit f1d4711

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

inst/include/Rcpp/api/meat/Datetime.h

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
// Copyright (C) 2013 Dirk Eddelbuettel and Romain Francois
1+
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; indent-tabs-mode: nil; -*-
2+
//
3+
// Copyright (C) 2013 - 2015 Dirk Eddelbuettel and Romain Francois
24
//
35
// This file is part of Rcpp.
46
//
@@ -18,32 +20,31 @@
1820
#ifndef Rcpp_api_meat_Datetime_h
1921
#define Rcpp_api_meat_Datetime_h
2022

21-
namespace Rcpp{
23+
namespace Rcpp {
2224

2325
inline Datetime::Datetime(SEXP d) {
24-
m_dt = Rcpp::as<double>(d);
25-
update_tm();
26+
m_dt = Rcpp::as<double>(d);
27+
update_tm();
2628
}
2729

2830
inline Datetime::Datetime(const std::string &s, const std::string &fmt) {
29-
Rcpp::Function strptime("strptime"); // we cheat and call strptime() from R
30-
Rcpp::Function asPOSIXct("as.POSIXct"); // and we need to convert to POSIXct
31-
m_dt = Rcpp::as<double>(asPOSIXct(strptime(s, fmt)));
32-
update_tm();
31+
Rcpp::Function strptime("strptime"); // we cheat and call strptime() from R
32+
Rcpp::Function asPOSIXct("as.POSIXct"); // and we need to convert to POSIXct
33+
m_dt = Rcpp::as<double>(asPOSIXct(strptime(s, fmt)));
34+
update_tm();
3335
}
3436

3537
template<>
36-
inline SEXP wrap_extra_steps<Rcpp::Datetime>( SEXP x ){
37-
Rf_setAttrib(x, R_ClassSymbol, internal::getPosixClasses() );
38-
return x ;
38+
inline SEXP wrap_extra_steps<Rcpp::Datetime>(SEXP x) {
39+
Rf_setAttrib(x, R_ClassSymbol, internal::getPosixClasses());
40+
return x ;
3941
}
4042

4143
template <>
4244
inline SEXP wrap<Datetime>(const Datetime &date) {
43-
return internal::new_posixt_object( date.getFractionalTimestamp() ) ;
45+
return internal::new_posixt_object(date.getFractionalTimestamp());
4446
}
4547

46-
4748
}
4849

4950
#endif

0 commit comments

Comments
 (0)