Skip to content

Commit

Permalink
Compile on mac
Browse files Browse the repository at this point in the history
  • Loading branch information
richfitz committed Oct 7, 2024
1 parent f05c53e commit e864664
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inst/include/dust2/r/debug.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ void save(T x, const char * name, cpp11::environment env) {
template <typename T, size_t rank>
void save(T *x, array::dimensions<rank> dim, const char * name,
cpp11::environment env) {
const size_t size = dim.size();
const R_xlen_t size = dim.size();
cpp11::writable::doubles r_x(size);
std::copy_n(x, size, REAL(r_x));
if (rank > 1) {
cpp11::writable::integers r_dim(rank);
cpp11::writable::integers r_dim(static_cast<R_xlen_t>(rank));
std::copy_n(dim.dim.begin(), rank, INTEGER(r_dim));
r_x.attr("dim") = r_dim;
}
Expand Down

0 comments on commit e864664

Please sign in to comment.