Skip to content

Commit 3337a12

Browse files
author
Florian Plaza Oñate
committed
Fix name collision
1 parent c9df117 commit 3337a12

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

inst/unitTests/cpp/Matrix.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,6 @@ NumericVector runit_const_Matrix_column( const NumericMatrix& m ){
239239
}
240240

241241
// [[Rcpp::export]]
242-
int access_with_bounds_checking(const IntegerMatrix m, int i, int j) {
242+
int mat_access_with_bounds_checking(const IntegerMatrix m, int i, int j) {
243243
return m.at(i, j);
244244
}

inst/unitTests/cpp/Vector.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,6 @@ int noprotect_matrix( Matrix<REALSXP, NoProtectStorage> x){
778778
return x.nrow() ;
779779
}
780780

781-
int access_with_bounds_checking(const IntegerVector x, int index) {
781+
int vec_access_with_bounds_checking(const IntegerVector x, int index) {
782782
return x.at(index);
783783
}

inst/unitTests/runit.Matrix.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,14 @@ if (.runThisTest) {
173173

174174
test.IntegerMatrix.accessor.with.bounds.checking <- function() {
175175
m <- matrix(seq(1L, 12, by=1L), nrow=4L, ncol=3L)
176-
checkEquals(access_with_bounds_checking(m, 0, 0), 1)
177-
checkEquals(access_with_bounds_checking(m, 1, 2), 10)
178-
checkEquals(access_with_bounds_checking(m, 3, 2), 12)
179-
checkException(access_with_bounds_checking(m, 4, 2) , msg = "index out of bounds not detected" )
180-
checkException(access_with_bounds_checking(m, 3, 3) , msg = "index out of bounds not detected" )
181-
checkException(access_with_bounds_checking(m, 3, -1) , msg = "index out of bounds not detected" )
182-
checkException(access_with_bounds_checking(m, -1, 2) , msg = "index out of bounds not detected" )
183-
checkException(access_with_bounds_checking(m, -1, -1) , msg = "index out of bounds not detected" )
176+
checkEquals(mat_access_with_bounds_checking(m, 0, 0), 1)
177+
checkEquals(mat_access_with_bounds_checking(m, 1, 2), 10)
178+
checkEquals(mat_access_with_bounds_checking(m, 3, 2), 12)
179+
checkException(mat_access_with_bounds_checking(m, 4, 2) , msg = "index out of bounds not detected" )
180+
checkException(mat_access_with_bounds_checking(m, 3, 3) , msg = "index out of bounds not detected" )
181+
checkException(mat_access_with_bounds_checking(m, 3, -1) , msg = "index out of bounds not detected" )
182+
checkException(mat_access_with_bounds_checking(m, -1, 2) , msg = "index out of bounds not detected" )
183+
checkException(mat_access_with_bounds_checking(m, -1, -1) , msg = "index out of bounds not detected" )
184184
}
185185

186186
}

inst/unitTests/runit.Vector.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,9 +686,9 @@ if (.runThisTest) {
686686

687687
test.IntegerVector.accessor.with.bounds.checking <- function() {
688688
x <- seq(1L, 5L, by=1L)
689-
checkEquals(access_with_bounds_checking(x, 3), 4)
690-
checkException(access_with_bounds_checking(x, 5) , msg = "index out of bounds not detected" )
691-
checkException(access_with_bounds_checking(x, -1) , msg = "index out of bounds not detected" )
689+
checkEquals(vec_access_with_bounds_checking(x, 3), 4)
690+
checkException(vec_access_with_bounds_checking(x, 5) , msg = "index out of bounds not detected" )
691+
checkException(vec_access_with_bounds_checking(x, -1) , msg = "index out of bounds not detected" )
692692
}
693693
}
694694

0 commit comments

Comments
 (0)