[Rcpp-commits] r4140 - in pkg/Rcpp: . src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 10 20:25:54 CET 2012


Author: jjallaire
Date: 2012-12-10 20:25:53 +0100 (Mon, 10 Dec 2012)
New Revision: 4140

Modified:
   pkg/Rcpp/ChangeLog
   pkg/Rcpp/src/AttributesGen.cpp
Log:
prune unnecessary includes from RcppExports

Modified: pkg/Rcpp/ChangeLog
===================================================================
--- pkg/Rcpp/ChangeLog	2012-12-10 18:54:24 UTC (rev 4139)
+++ pkg/Rcpp/ChangeLog	2012-12-10 19:25:53 UTC (rev 4140)
@@ -1,5 +1,6 @@
 2012-12-10  JJ Allaire <jj at rstudio.org>
 
+        * src/AttributesGen.cpp: prune unnecessary includes from RcppExports
         * src/Timer.cpp: fix timer build issues on windows
 
 2012-12-10 Romain Francois <romain at r-enthusiasts.com>

Modified: pkg/Rcpp/src/AttributesGen.cpp
===================================================================
--- pkg/Rcpp/src/AttributesGen.cpp	2012-12-10 18:54:24 UTC (rev 4139)
+++ pkg/Rcpp/src/AttributesGen.cpp	2012-12-10 19:25:53 UTC (rev 4140)
@@ -238,8 +238,10 @@
             for (std::size_t i=0;i<includes.size(); i++)
                 ostr << includes[i] << std::endl;
         }
-        ostr << "#include <string>" << std::endl;
-        ostr << "#include <set>" << std::endl;
+        if (hasCppInterface()) {
+            ostr << "#include <string>" << std::endl;
+            ostr << "#include <set>" << std::endl;
+        }
         ostr << std::endl;
         
         // always bring in Rcpp



More information about the Rcpp-commits mailing list