Skip to content

Commit e1e885f

Browse files
Armor::operator= takes const& parameters
1 parent 03d5d89 commit e1e885f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace Rcpp{
2828

2929
template <typename T>
3030
template <typename U>
31-
inline Armor<T>& Armor<T>::operator=( U x ){
31+
inline Armor<T>& Armor<T>::operator=( const U& x ){
3232
REPROTECT(data = wrap(x), index) ;
3333
return *this ;
3434
}

inst/include/Rcpp/protection/Armor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace Rcpp {
3535
}
3636

3737
template <typename U>
38-
inline Armor& operator=( U x ) ;
38+
inline Armor& operator=( const U& x ) ;
3939

4040
~Armor(){
4141
UNPROTECT(1) ;

0 commit comments

Comments
 (0)