Skip to content

Commit 618f419

Browse files
committed
use less ambiguous overload in matrix/scalar tests
1 parent 1ee6e38 commit 618f419

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2016-05-08 Dirk Eddelbuettel <[email protected]>
2+
3+
* inst/unitTests/cpp/Matrix.cpp: Made four scalar/matrix tests less
4+
ambiguous for overloads by using double as scalar
5+
16
2016-05-06 Dirk Eddelbuettel <[email protected]>
27

38
* R/loadRcppModules.R (loadRcppModules): Add call to .Deprecated

inst/unitTests/cpp/Matrix.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// Matrix.cpp: Rcpp R/C++ interface class library -- Matrix unit tests
44
//
5-
// Copyright (C) 2013 - 2014 Dirk Eddelbuettel, Romain Francois and Kevin Ushey
5+
// Copyright (C) 2013 - 2016 Dirk Eddelbuettel, Romain Francois and Kevin Ushey
66
//
77
// This file is part of Rcpp.
88
//
@@ -313,21 +313,21 @@ CharacterMatrix transposeCharacter(const CharacterMatrix & x) {
313313
}
314314

315315
// [[Rcpp::export]]
316-
NumericMatrix matrix_scalar_plus(const NumericMatrix & x, int y) {
316+
NumericMatrix matrix_scalar_plus(const NumericMatrix & x, double y) {
317317
return x + y;
318318
}
319319

320320
// [[Rcpp::export]]
321-
NumericMatrix matrix_scalar_plus2(const NumericMatrix & x, int y) {
321+
NumericMatrix matrix_scalar_plus2(const NumericMatrix & x, double y) {
322322
return y + x;
323323
}
324324

325325
// [[Rcpp::export]]
326-
NumericMatrix matrix_scalar_divide(const NumericMatrix & x, int y) {
326+
NumericMatrix matrix_scalar_divide(const NumericMatrix & x, double y) {
327327
return x / y;
328328
}
329329

330330
// [[Rcpp::export]]
331-
NumericMatrix matrix_scalar_divide2(const NumericMatrix & x, int y) {
331+
NumericMatrix matrix_scalar_divide2(const NumericMatrix & x, double y) {
332332
return y / x;
333333
}

0 commit comments

Comments
 (0)