Skip to content

Commit 54f27cd

Browse files
committed
Make warnings opt-in for now
1 parent a905ac1 commit 54f27cd

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

inst/NEWS.Rd

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
\section{Changes in [UNRELEASED] Rcpp version 0.11.2}{
66
\itemize{
77
\item Implicit conversions, e.g. between \code{NumericVector} and
8-
\code{IntegerVector}, now throw warnings. These warnings can be
9-
disabled by defining \code{\#define RCPP_DONT_WARN_ON_COERCE}
10-
before including Rcpp, or by making the conversion explicit with
11-
e.g. \code{Rf_coerceVector}.
8+
\code{IntegerVector}, will now give warnings if you use
9+
\code{\#define RCPP_WARN_ON_COERCE} before including the Rcpp
10+
headers.
1211
\item Templated \code{List} containers, \code{ListOf<T>}, have been
1312
introduced. When subsetting such containers, the return is assumed
1413
to be of type T, allowing code such as

inst/include/Rcpp/r_cast.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ namespace Rcpp{
139139
if (TYPEOF(x) == TARGET) {
140140
return x;
141141
} else {
142-
#ifndef RCPP_DONT_WARN_ON_COERCE
142+
#ifdef RCPP_WARN_ON_COERCE
143143
Shield<SEXP> result( internal::r_true_cast<TARGET>(x) );
144144
Rf_warning("coerced object from '%s' to '%s'",
145145
CHAR(Rf_type2str(TYPEOF(x))),

0 commit comments

Comments
 (0)