From 1cb485b59a452b08e703f05df94e939c024bfb02 Mon Sep 17 00:00:00 2001 From: Kevin Ushey Date: Sun, 7 Jul 2024 20:38:26 +0800 Subject: [PATCH] another const_cast --- src/barrier.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/barrier.cpp b/src/barrier.cpp index 9d0fdf7ed..c4e417920 100644 --- a/src/barrier.cpp +++ b/src/barrier.cpp @@ -54,7 +54,8 @@ void char_set_string_elt(SEXP x, R_xlen_t i, const char* value) { // [[Rcpp::register]] SEXP* get_string_ptr(SEXP x) { - return RCPP_STRING_PTR(x); + // TODO: should we deprecate this? + return const_cast(RCPP_STRING_PTR(x)); } // [[Rcpp::register]]