From e86466492871500a48208e69a3cbe4e524fde5e7 Mon Sep 17 00:00:00 2001 From: Rich FitzJohn Date: Mon, 7 Oct 2024 15:55:55 +0100 Subject: [PATCH] Compile on mac --- inst/include/dust2/r/debug.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inst/include/dust2/r/debug.hpp b/inst/include/dust2/r/debug.hpp index b9a17969..5a44f142 100644 --- a/inst/include/dust2/r/debug.hpp +++ b/inst/include/dust2/r/debug.hpp @@ -21,11 +21,11 @@ void save(T x, const char * name, cpp11::environment env) { template void save(T *x, array::dimensions 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(rank)); std::copy_n(dim.dim.begin(), rank, INTEGER(r_dim)); r_x.attr("dim") = r_dim; }