From 01bc6ea8bd7295eed7eeb729112cf40b5cc5826d Mon Sep 17 00:00:00 2001 From: Omar Shrit Date: Sat, 12 Sep 2020 17:52:31 +0200 Subject: [PATCH] Apply the new style for serialization Signed-off-by: Omar Shrit --- CMake/R/ConfigureRCPP.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMake/R/ConfigureRCPP.cmake b/CMake/R/ConfigureRCPP.cmake index 2ab696402d..e728c73d34 100644 --- a/CMake/R/ConfigureRCPP.cmake +++ b/CMake/R/ConfigureRCPP.cmake @@ -55,8 +55,8 @@ Rcpp::RawVector Serialize${MODEL_SAFE_TYPE}Ptr(SEXP ptr) std::ostringstream oss; { cereal::BinaryOutputArchive oa(oss); - oa << cereal::make_nvp(\"${MODEL_SAFE_TYPE}\", - *Rcpp::as<${MODEL_PTR_TYPEDEF}>(ptr)); + oa(cereal::make_nvp(\"${MODEL_SAFE_TYPE}\", + *Rcpp::as<${MODEL_PTR_TYPEDEF}>(ptr))); } Rcpp::RawVector raw_vec(oss.str().size()); @@ -77,7 +77,7 @@ SEXP Deserialize${MODEL_SAFE_TYPE}Ptr(Rcpp::RawVector str) std::istringstream iss(std::string((char *) &str[0], str.size())); { cereal::BinaryInputArchive ia(iss); - ia >> cereal::make_nvp(\"${MODEL_SAFE_TYPE}\", *ptr); + ia(cereal::make_nvp(\"${MODEL_SAFE_TYPE}\", *ptr)); } // R will be responsible for freeing this.