[Rcpp-commits] r884 - in pkg/Rcpp/src: . Rcpp Rcpp/internal
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Mar 12 21:11:46 CET 2010
Author: dmbates
Date: 2010-03-12 21:11:45 +0100 (Fri, 12 Mar 2010)
New Revision: 884
Modified:
pkg/Rcpp/src/Environment.cpp
pkg/Rcpp/src/Evaluator.cpp
pkg/Rcpp/src/Function.cpp
pkg/Rcpp/src/Language.cpp
pkg/Rcpp/src/Pairlist.cpp
pkg/Rcpp/src/RObject.cpp
pkg/Rcpp/src/Rcpp/RObject.h
pkg/Rcpp/src/Rcpp/StringTransformer.h
pkg/Rcpp/src/Rcpp/Vector.h
pkg/Rcpp/src/Rcpp/as.h
pkg/Rcpp/src/Rcpp/internal/r_coerce.h
pkg/Rcpp/src/Rcpp/internal/r_vector.h
pkg/Rcpp/src/Rcpp/internal/wrap.h
pkg/Rcpp/src/RcppCommon.cpp
pkg/Rcpp/src/RcppDatetime.cpp
pkg/Rcpp/src/RcppFrame.cpp
pkg/Rcpp/src/RcppFunction.cpp
pkg/Rcpp/src/RcppList.cpp
Log:
Remove redundant semicolons (-Wall -pedantic complaints)
Modified: pkg/Rcpp/src/Environment.cpp
===================================================================
--- pkg/Rcpp/src/Environment.cpp 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/Environment.cpp 2010-03-12 20:11:45 UTC (rev 884)
@@ -23,7 +23,7 @@
namespace Rcpp {
- Environment::not_found::not_found(const std::string& binding_) : binding(binding_){};
+ Environment::not_found::not_found(const std::string& binding_) : binding(binding_){}
Environment::not_found::~not_found() throw(){}
const char* Environment::not_found::what() const throw(){
std::string message( "not found : " ) ;
Modified: pkg/Rcpp/src/Evaluator.cpp
===================================================================
--- pkg/Rcpp/src/Evaluator.cpp 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/Evaluator.cpp 2010-03-12 20:11:45 UTC (rev 884)
@@ -25,7 +25,7 @@
Evaluator::eval_error::eval_error( const std::string& message) throw() :
message(message){}
- Evaluator::eval_error::~eval_error( ) throw(){} ;
+ Evaluator::eval_error::~eval_error( ) throw(){}
const char* Evaluator::eval_error::what() const throw(){ return message.c_str() ; }
SEXP Evaluator::run(SEXP expr, SEXP env) throw(eval_error) {
Modified: pkg/Rcpp/src/Function.cpp
===================================================================
--- pkg/Rcpp/src/Function.cpp 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/Function.cpp 2010-03-12 20:11:45 UTC (rev 884)
@@ -40,7 +40,7 @@
default:
throw not_compatible("cannot convert to function") ;
}
- };
+ }
Function::Function(const std::string& name) throw(no_such_function) : RObject() {
SEXP x = PROTECT( Rf_findFun( Rf_install(name.c_str()), R_GlobalEnv ) ) ;
Modified: pkg/Rcpp/src/Language.cpp
===================================================================
--- pkg/Rcpp/src/Language.cpp 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/Language.cpp 2010-03-12 20:11:45 UTC (rev 884)
@@ -23,11 +23,11 @@
namespace Rcpp {
- Language::Language() : DottedPair() {};
+ Language::Language() : DottedPair() {}
Language::Language( SEXP x ) throw(not_compatible) : DottedPair(){
setSEXP( r_cast<LANGSXP>(x) ) ;
- };
+ }
Language::Language( const Language& other): DottedPair(){
setSEXP( other.asSexp() ) ;
Modified: pkg/Rcpp/src/Pairlist.cpp
===================================================================
--- pkg/Rcpp/src/Pairlist.cpp 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/Pairlist.cpp 2010-03-12 20:11:45 UTC (rev 884)
@@ -23,10 +23,10 @@
namespace Rcpp {
- Pairlist::Pairlist() : DottedPair() {};
+ Pairlist::Pairlist() : DottedPair() {}
Pairlist::Pairlist( SEXP x ) throw(not_compatible) : DottedPair(){
setSEXP( r_cast<LISTSXP>(x) );
- };
+ }
Pairlist::~Pairlist(){}
Pairlist::Pairlist( const Pairlist& other): DottedPair(){
setSEXP( other.asSexp() ) ;
Modified: pkg/Rcpp/src/RObject.cpp
===================================================================
--- pkg/Rcpp/src/RObject.cpp 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/RObject.cpp 2010-03-12 20:11:45 UTC (rev 884)
@@ -92,7 +92,7 @@
if( !R_has_slot( v, Rf_install(name.c_str())) ){
throw no_such_slot() ;
}
-} ;
+}
RObject::SlotProxy& RObject::SlotProxy::operator=(const SlotProxy& rhs){
set( rhs.get() ) ;
@@ -127,7 +127,7 @@
}
RObject::AttributeProxy::AttributeProxy( const RObject& v, const std::string& name) :
- parent(v), attr_name(name) {};
+ parent(v), attr_name(name) {}
RObject::AttributeProxy& RObject::AttributeProxy::operator=(const AttributeProxy& rhs){
set( rhs.get() ) ;
Modified: pkg/Rcpp/src/Rcpp/RObject.h
===================================================================
--- pkg/Rcpp/src/Rcpp/RObject.h 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/Rcpp/RObject.h 2010-03-12 20:11:45 UTC (rev 884)
@@ -156,7 +156,7 @@
*/
template <typename T> operator T() const {
return as<T>(get()) ;
- } ;
+ }
private:
const RObject& parent;
@@ -198,7 +198,7 @@
template <typename T> SlotProxy& operator=(const T& rhs){
set( wrap(rhs) ) ;
return *this ;
- } ;
+ }
/**
* rhs use. Retrieves the current value of the slot
@@ -207,7 +207,7 @@
*/
template <typename T> operator T() const {
return as<T>(get()) ;
- } ;
+ }
private:
const RObject& parent;
Modified: pkg/Rcpp/src/Rcpp/StringTransformer.h
===================================================================
--- pkg/Rcpp/src/Rcpp/StringTransformer.h 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/Rcpp/StringTransformer.h 2010-03-12 20:11:45 UTC (rev 884)
@@ -46,7 +46,7 @@
template <typename UnaryOperator>
StringTransformer<UnaryOperator> make_string_transformer( const UnaryOperator& fun){
return StringTransformer<UnaryOperator>( fun ) ;
- } ;
+ }
}
Modified: pkg/Rcpp/src/Rcpp/Vector.h
===================================================================
--- pkg/Rcpp/src/Rcpp/Vector.h 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/Rcpp/Vector.h 2010-03-12 20:11:45 UTC (rev 884)
@@ -274,7 +274,7 @@
template <>
inline SEXP vector_from_string<EXPRSXP>( const std::string& st ){
return vector_from_string_expr<EXPRSXP>( st ) ;
- } ;
+ }
template <typename VECTOR> class eval_methods {} ;
@@ -571,7 +571,7 @@
template <typename T> operator T() const {
return Rcpp::as<T>(get()) ;
- } ;
+ }
private:
const Vector& parent;
@@ -1378,11 +1378,11 @@
Rcpp::internal::TYPE<RTYPE>& a , \
Rcpp::internal::TYPE<RTYPE>& b) { \
a.swap(b) ; \
- } ;
+ }
-RCPP_GENERATE_SWAP( generic_proxy,VECSXP) ;
-RCPP_GENERATE_SWAP( generic_proxy,EXPRSXP) ;
-RCPP_GENERATE_SWAP( string_proxy,STRSXP) ;
+RCPP_GENERATE_SWAP( generic_proxy,VECSXP)
+RCPP_GENERATE_SWAP( generic_proxy,EXPRSXP)
+RCPP_GENERATE_SWAP( string_proxy,STRSXP)
#undef RCPP_GENERATE_SWAP
}
Modified: pkg/Rcpp/src/Rcpp/as.h
===================================================================
--- pkg/Rcpp/src/Rcpp/as.h 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/Rcpp/as.h 2010-03-12 20:11:45 UTC (rev 884)
@@ -73,7 +73,7 @@
return internal::as<T>( m_sexp, typename traits::r_type_traits<T>::r_category() ) ;
}
-template<> inline SEXP as(SEXP m_sexp) { return m_sexp ; } ;
+template<> inline SEXP as(SEXP m_sexp) { return m_sexp ; }
} // Rcpp
Modified: pkg/Rcpp/src/Rcpp/internal/r_coerce.h
===================================================================
--- pkg/Rcpp/src/Rcpp/internal/r_coerce.h 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/Rcpp/internal/r_coerce.h 2010-03-12 20:11:45 UTC (rev 884)
@@ -31,7 +31,7 @@
r_coerce( typename ::Rcpp::traits::storage_type<FROM>::type from ){
// this implementation is never actually called
return static_cast<typename ::Rcpp::traits::storage_type<TO>::type >(from);
-} ;
+}
template <> int r_coerce<INTSXP,INTSXP>(int from) ;
template <> int r_coerce<LGLSXP,LGLSXP>(int from) ;
template <> double r_coerce<REALSXP,REALSXP>(double from);
Modified: pkg/Rcpp/src/Rcpp/internal/r_vector.h
===================================================================
--- pkg/Rcpp/src/Rcpp/internal/r_vector.h 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/Rcpp/internal/r_vector.h 2010-03-12 20:11:45 UTC (rev 884)
@@ -26,7 +26,7 @@
namespace Rcpp{
namespace internal{
-template<int RTYPE, typename CTYPE> CTYPE* r_vector_start(SEXP x){ return static_cast<CTYPE*>(0) ; } ;
+template<int RTYPE, typename CTYPE> CTYPE* r_vector_start(SEXP x){ return static_cast<CTYPE*>(0) ; }
template<> int* r_vector_start<INTSXP,int>(SEXP x) ;
template<> int* r_vector_start<LGLSXP,int>(SEXP x) ;
template<> double* r_vector_start<REALSXP,double>(SEXP x) ;
@@ -37,7 +37,7 @@
* The value 0 statically casted to the appropriate type for
* the given SEXP type
*/
-template <int RTYPE,typename CTYPE> CTYPE get_zero(){ return static_cast<CTYPE>(0) ; } ;
+template <int RTYPE,typename CTYPE> CTYPE get_zero(){ return static_cast<CTYPE>(0) ; }
/**
* Specialization for Rcomplex
*/
Modified: pkg/Rcpp/src/Rcpp/internal/wrap.h
===================================================================
--- pkg/Rcpp/src/Rcpp/internal/wrap.h 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/Rcpp/internal/wrap.h 2010-03-12 20:11:45 UTC (rev 884)
@@ -93,7 +93,7 @@
template <typename InputIterator, typename T>
SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_primitive_tag){
return primitive_range_wrap__impl<InputIterator,T>( first, last, typename ::Rcpp::traits::r_sexptype_needscast<T>() ) ;
-} ;
+}
/**
* range based wrap implementation that deals with iterators over
@@ -113,7 +113,7 @@
}
UNPROTECT(1) ;
return x ;
-} ;
+}
/**
* Range based wrap implementation for iterators over std::string
@@ -165,7 +165,7 @@
::Rf_setAttrib( x, R_NamesSymbol, names ) ;
UNPROTECT(2) ; /* x, names */
return x ;
-} ;
+}
/**
* range based wrap implementation that deals with iterators over
@@ -194,7 +194,7 @@
::Rf_setAttrib( x, R_NamesSymbol, names ) ;
UNPROTECT(2) ; /* x, names */
return x ;
-} ;
+}
/**
@@ -210,7 +210,7 @@
SEXP range_wrap_dispatch___impl( InputIterator first, InputIterator last, ::Rcpp::traits::r_type_pairstring_primitive_tag){
return range_wrap_dispatch___impl__cast<InputIterator,T>( first, last,
typename ::Rcpp::traits::r_sexptype_needscast<typename T::second_type>() ) ;
-} ;
+}
/**
* Range based wrap implementation that deals with iterators over
@@ -242,7 +242,7 @@
::Rf_setAttrib( x, R_NamesSymbol, names ) ;
UNPROTECT(2) ; /* x, names */
return x ;
-} ;
+}
/**
* Range based wrap for iterators over std::pair<const std::string, std::string>
@@ -310,7 +310,7 @@
r_vector_start<RTYPE, typename ::Rcpp::traits::storage_type<RTYPE>::type >(x)[0] = object ;
UNPROTECT(1);
return x;
-} ;
+}
/**
* wraps a single primitive value when a cast is needed
@@ -322,7 +322,7 @@
r_vector_start<RTYPE, typename ::Rcpp::traits::storage_type<RTYPE>::type >(x)[0] = static_cast< typename ::Rcpp::traits::storage_type<RTYPE>::type >(object) ;
UNPROTECT(1);
return x;
-} ;
+}
/**
* primitive wrap for 'easy' primitive types: int, double, Rbyte, Rcomplex
@@ -332,7 +332,7 @@
template <typename T>
SEXP primitive_wrap__impl( const T& object, ::Rcpp::traits::r_type_primitive_tag ){
return primitive_wrap__impl__cast( object, typename ::Rcpp::traits::r_sexptype_needscast<T>() );
-} ;
+}
/**
* primitive wrap for types that can be converted implicitely to std::string
@@ -542,7 +542,7 @@
}
// special case - FIXME : this is not template specializations of wrap<>
-inline SEXP wrap(const char* const v ){ return Rf_mkString(v) ; } ;
+inline SEXP wrap(const char* const v ){ return Rf_mkString(v) ; }
/**
* Range based version of wrap
Modified: pkg/Rcpp/src/RcppCommon.cpp
===================================================================
--- pkg/Rcpp/src/RcppCommon.cpp 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/RcppCommon.cpp 2010-03-12 20:11:45 UTC (rev 884)
@@ -128,15 +128,15 @@
namespace Rcpp{
namespace internal{
- template<> int* r_vector_start<INTSXP,int>(SEXP x){ return INTEGER(x) ; } ;
- template<> int* r_vector_start<LGLSXP,int>(SEXP x){ return LOGICAL(x) ; };
- template<> double* r_vector_start<REALSXP,double>(SEXP x){ return REAL(x) ; } ;
- template<> Rbyte* r_vector_start<RAWSXP,Rbyte>(SEXP x){ return RAW(x) ; } ;
- template<> Rcomplex* r_vector_start<CPLXSXP,Rcomplex>(SEXP x){ return COMPLEX(x) ; } ;
+ template<> int* r_vector_start<INTSXP,int>(SEXP x){ return INTEGER(x) ; }
+ template<> int* r_vector_start<LGLSXP,int>(SEXP x){ return LOGICAL(x) ; }
+ template<> double* r_vector_start<REALSXP,double>(SEXP x){ return REAL(x) ; }
+ template<> Rbyte* r_vector_start<RAWSXP,Rbyte>(SEXP x){ return RAW(x) ; }
+ template<> Rcomplex* r_vector_start<CPLXSXP,Rcomplex>(SEXP x){ return COMPLEX(x) ; }
- template<> void r_init_vector<VECSXP>(SEXP x){} ;
- template<> void r_init_vector<EXPRSXP>(SEXP x){} ;
- template<> void r_init_vector<STRSXP>(SEXP x){} ;
+ template<> void r_init_vector<VECSXP>(SEXP x){}
+ template<> void r_init_vector<EXPRSXP>(SEXP x){}
+ template<> void r_init_vector<STRSXP>(SEXP x){}
template<> Rcomplex get_zero<CPLXSXP,Rcomplex>(){
Rcomplex x ;
Modified: pkg/Rcpp/src/RcppDatetime.cpp
===================================================================
--- pkg/Rcpp/src/RcppDatetime.cpp 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/RcppDatetime.cpp 2010-03-12 20:11:45 UTC (rev 884)
@@ -25,18 +25,18 @@
RcppDatetime::RcppDatetime(void) : m_d(0),
m_parsed(false),
m_us(0) {
-};
+}
RcppDatetime::RcppDatetime(const double d) : m_d(d),
m_parsed(false),
m_us(0) {
-};
+}
RcppDatetime::RcppDatetime(SEXP ds) {
m_d = REAL(ds)[0];
m_parsed = false;
m_us = 0;
-};
+}
void RcppDatetime::parseTime() {
// tt is the nb of seconds, ignores fractional microsec
@@ -47,7 +47,7 @@
m_us = static_cast<int>(round( (m_d - tt) * 1.0e6));
m_parsed = true; // and note that we parsed the time type
-};
+}
std::ostream& operator<<(std::ostream& os, const RcppDatetime &datetime) {
RcppDatetime dt(datetime);
@@ -57,11 +57,11 @@
snprintf(usec, 15, ".%.06d", dt.m_us);
os << buf << usec;
return os;
-};
+}
RcppDatetime operator+(const RcppDatetime &date, double offset) {
RcppDatetime tmp(date.m_d);
tmp.m_d += offset;
tmp.m_parsed = false;
return tmp;
-};
+}
Modified: pkg/Rcpp/src/RcppFrame.cpp
===================================================================
--- pkg/Rcpp/src/RcppFrame.cpp 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/RcppFrame.cpp 2010-03-12 20:11:45 UTC (rev 884)
@@ -22,7 +22,7 @@
#include <RcppFrame.h>
-ColDatum::ColDatum() : level(0) { };
+ColDatum::ColDatum() : level(0) { }
ColDatum::ColDatum(const ColDatum& datum) {
// Need deep copy so contruction/destruction is synchronized.
Modified: pkg/Rcpp/src/RcppFunction.cpp
===================================================================
--- pkg/Rcpp/src/RcppFunction.cpp 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/RcppFunction.cpp 2010-03-12 20:11:45 UTC (rev 884)
@@ -29,7 +29,7 @@
currListPosn = 0;
listSize = 0;
vectorArg = listArg = R_NilValue;
-};
+}
RcppFunction::~RcppFunction() {
UNPROTECT(numProtected);
Modified: pkg/Rcpp/src/RcppList.cpp
===================================================================
--- pkg/Rcpp/src/RcppList.cpp 2010-03-12 18:46:21 UTC (rev 883)
+++ pkg/Rcpp/src/RcppList.cpp 2010-03-12 20:11:45 UTC (rev 884)
@@ -25,7 +25,7 @@
listSize(0),
currListPosn(0),
numProtected(0) {
-};
+}
RcppList::~RcppList(void) {
UNPROTECT(numProtected);
More information about the Rcpp-commits
mailing list