@@ -25,29 +25,29 @@ std::string hello() {
2525 throw std::range_error ( " boom" ) ;
2626}
2727
28- int bar ( int x){
29- return x*2 ;
28+ int bar (int x) {
29+ return x*2 ;
3030}
3131
32- double foo ( int x, double y){
33- return x * y ;
32+ double foo (int x, double y) {
33+ return x * y;
3434}
3535
36- void bla ( ) {
37- Rprintf ( " hello\\ n" ) ;
36+ void bla () {
37+ Rprintf (" hello\\ n" ) ;
3838}
3939
40- void bla1 ( int x){
41- Rprintf ( " hello (x = %d)\\ n" , x ) ;
40+ void bla1 (int x) {
41+ Rprintf (" hello (x = %d)\\ n" , x) ;
4242}
4343
44- void bla2 ( int x, double y){
45- Rprintf ( " hello (x = %d, y = %5.2f)\\ n" , x, y ) ;
44+ void bla2 ( int x, double y) {
45+ Rprintf (" hello (x = %d, y = %5.2f)\\ n" , x, y) ;
4646}
4747
4848class World {
4949public:
50- World () : msg(" hello" ){}
50+ World () : msg(" hello" ) {}
5151 void set (std::string msg) { this ->msg = msg; }
5252 std::string greet () { return msg; }
5353
@@ -60,25 +60,25 @@ class World {
6060RCPP_MODULE (yada){
6161 using namespace Rcpp ;
6262
63- function ( " hello" , &hello , " documentation for hello " );
64- function ( " bla" , &bla , " documentation for bla " );
65- function ( " bla1" , &bla1 , " documentation for bla1 " );
66- function ( " bla2" , &bla2 , " documentation for bla2 " );
63+ function (" hello" , &hello , " documentation for hello " );
64+ function (" bla" , &bla , " documentation for bla " );
65+ function (" bla1" , &bla1 , " documentation for bla1 " );
66+ function (" bla2" , &bla2 , " documentation for bla2 " );
6767
6868 // with formal arguments specification
69- function ( " bar" , &bar ,
70- List::create ( _[" x" ] = 0.0 ),
71- " documentation for bar " ) ;
72- function ( " foo" , &foo ,
73- List::create ( _[" x" ] = 1 , _[" y" ] = 1.0 ),
74- " documentation for foo " ) ;
69+ function (" bar" , &bar ,
70+ List::create ( _[" x" ] = 0.0 ),
71+ " documentation for bar " ) ;
72+ function (" foo" , &foo ,
73+ List::create ( _[" x" ] = 1 , _[" y" ] = 1.0 ),
74+ " documentation for foo " ) ;
7575
76- class_<World>( " World" )
76+ class_<World>(" World" )
7777 // expose the default constructor
7878 .constructor ()
7979
80- .method ( " greet" , &World::greet , " get the message" )
81- .method ( " set" , &World::set , " set the message" )
80+ .method (" greet" , &World::greet , " get the message" )
81+ .method (" set" , &World::set , " set the message" )
8282 ;
8383}
8484
0 commit comments