Skip to content

Commit

Permalink
Fix handling of integers
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Oct 2, 2024
1 parent 7efb72e commit 5b0c6c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: odin.dust
Title: Compile Odin to Dust
Version: 0.3.11
Version: 0.3.12
Authors@R: c(person("Rich", "FitzJohn", role = c("aut", "cre"),
email = "[email protected]"),
person("Alex", "Hill", role = "aut"),
Expand Down
5 changes: 3 additions & 2 deletions inst/support.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ void user_check_array_rank(cpp11::sexp x, const char *name) {
} else if (N == 2) {
cpp11::stop("Expected a matrix for '%s'", name);
} else {
cpp11::stop("Expected an array of rank %d for '%s'", N, name);
cpp11::stop("Expected an array of rank %d for '%s'",
static_cast<int>(N), name);
}
}
}
Expand All @@ -76,7 +77,7 @@ void user_check_array_dim(cpp11::sexp x, const char *name,
for (size_t i = 0; i < N; ++i) {
if (dim[(int)i] != dim_expected[i]) {
Rf_error("Incorrect size of dimension %zu of '%s' (expected %d)",
i + 1, name, dim_expected[i]);
static_cast<int>(i + 1), name, dim_expected[i]);
}
}
}
Expand Down

0 comments on commit 5b0c6c3

Please sign in to comment.