Skip to content
This repository has been archived by the owner on Dec 29, 2019. It is now read-only.

Commit

Permalink
Call constructor instead of assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
krlmlr committed Aug 18, 2018
1 parent 6856fbc commit 6e77a95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions RcppNoInitTest.so.bcheck
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,4 @@ Function Rcpp::internal::is_Rcpp_eval_call(SEXPREC*)
Function _RcppNoInitTest_test
[UP] ignoring variable <unnamed var: %14 = alloca %struct.SEXPREC*, align 8> as it has address taken, results will be incomplete
[PB] has possible protection stack imbalance /home/kirill/git/R/RcppNoInitTest/src/RcppExports.cpp:17

Function _ZNK4Rcpp14no_init_vectorcvNS_6VectorIXT_ET0_EEILi13ENS_15PreserveStorageEEEv
[UP] calling allocating function Rcpp::Vector<13, Rcpp::PreserveStorage>::Vector(SEXPREC*)(?,V) with argument allocated using Rf_allocVector /home/kirill/git/R/rchk/trunk/packages/lib/Rcpp/include/Rcpp/vector/no_init.h:40
Analyzed 171 functions, traversed 1013 states.
Analyzed 152 functions, traversed 956 states.
2 changes: 1 addition & 1 deletion src/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ using namespace Rcpp;
//' @useDynLib RcppNoInitTest, .registration = TRUE
// [[Rcpp::export]]
IntegerVector test() {
IntegerVector ret = no_init(1);
IntegerVector ret(no_init(1));
return ret;
}

0 comments on commit 6e77a95

Please sign in to comment.