[Rcpp-commits] r320 - in pkg/src: . Rcpp
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jan 8 19:55:38 CET 2010
Author: romain
Date: 2010-01-08 19:55:38 +0100 (Fri, 08 Jan 2010)
New Revision: 320
Modified:
pkg/src/CharacterVector.cpp
pkg/src/ExpressionVector.cpp
pkg/src/Rcpp/ExpressionVector.h
pkg/src/Rcpp/GenericVector.h
Log:
make Wall happy
Modified: pkg/src/CharacterVector.cpp
===================================================================
--- pkg/src/CharacterVector.cpp 2010-01-08 18:33:58 UTC (rev 319)
+++ pkg/src/CharacterVector.cpp 2010-01-08 18:55:38 UTC (rev 320)
@@ -105,10 +105,12 @@
CharacterVector::StringProxy& CharacterVector::StringProxy::operator=( const StringProxy& rhs){
SET_STRING_ELT( parent, index, STRING_ELT( rhs.parent, rhs.index) ) ;
+ return *this ;
}
CharacterVector::StringProxy& CharacterVector::StringProxy::operator=( const std::string& rhs){
SET_STRING_ELT( parent, index, Rf_mkChar( rhs.c_str() ) ) ;
+ return *this ;
}
const CharacterVector::StringProxy CharacterVector::operator[](int i) const {
Modified: pkg/src/ExpressionVector.cpp
===================================================================
--- pkg/src/ExpressionVector.cpp 2010-01-08 18:33:58 UTC (rev 319)
+++ pkg/src/ExpressionVector.cpp 2010-01-08 18:55:38 UTC (rev 320)
@@ -54,7 +54,7 @@
ExpressionVector::ExpressionVector( std::initializer_list<RObject> list ) {
SEXP x = PROTECT( Rf_allocVector( EXPRSXP, list.size() ) ) ;
const RObject* p = list.begin() ;
- for( int i=0; i<list.size() ; i++, p++){
+ for( size_t i=0; i<list.size() ; i++, p++){
SET_VECTOR_ELT( x, i, p->asSexp() ) ;
}
setSEXP( x ) ;
@@ -81,10 +81,12 @@
ExpressionVector::Proxy& ExpressionVector::Proxy::operator=( const Proxy& rhs){
SET_VECTOR_ELT( parent, index, VECTOR_ELT( rhs.parent, rhs.index) ) ;
+ return *this ;
}
ExpressionVector::Proxy& ExpressionVector::Proxy::operator=( SEXP rhs){
SET_VECTOR_ELT( parent, index, rhs ) ;
+ return *this ;
}
const ExpressionVector::Proxy ExpressionVector::operator[](int i) const {
Modified: pkg/src/Rcpp/ExpressionVector.h
===================================================================
--- pkg/src/Rcpp/ExpressionVector.h 2010-01-08 18:33:58 UTC (rev 319)
+++ pkg/src/Rcpp/ExpressionVector.h 2010-01-08 18:55:38 UTC (rev 320)
@@ -47,6 +47,7 @@
template <typename T>
Proxy& operator=( const T& rhs){
SET_VECTOR_ELT( parent, index, wrap(rhs) ) ;
+ return *this;
}
/* rvalue use */
Modified: pkg/src/Rcpp/GenericVector.h
===================================================================
--- pkg/src/Rcpp/GenericVector.h 2010-01-08 18:33:58 UTC (rev 319)
+++ pkg/src/Rcpp/GenericVector.h 2010-01-08 18:55:38 UTC (rev 320)
@@ -47,6 +47,7 @@
template <typename T>
Proxy& operator=( const T& rhs){
SET_VECTOR_ELT( parent, index, wrap(rhs) ) ;
+ return *this;
}
/* rvalue use */
More information about the Rcpp-commits
mailing list