Skip to content

Commit e852135

Browse files
krlmlreddelbuettel
authored andcommitted
Remove name for unused arguments (#672)
* annotate unused arguments * remove name for unused args
1 parent 940e34e commit e852135

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

inst/include/Rcpp/sugar/functions/rep.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class Rep_Single : public Rcpp::VectorBase<
5353
public:
5454
Rep_Single( const T& x_, R_xlen_t n_) : x(x_), n(n_){}
5555

56-
inline T operator[]( R_xlen_t i ) const {
56+
inline T operator[]( R_xlen_t ) const {
5757
return x;
5858
}
5959
inline R_xlen_t size() const { return n ; }

src/Rcpp_init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void registerFunctions(){
121121
}
122122

123123

124-
extern "C" void R_unload_Rcpp(DllInfo *info) { // #nocov start
124+
extern "C" void R_unload_Rcpp(DllInfo *) { // #nocov start
125125
// Release resources
126126
} // #nocov end
127127

src/attributes.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -696,8 +696,7 @@ namespace attributes {
696696
virtual bool commit(const std::vector<std::string>& includes);
697697

698698
private:
699-
virtual void doWriteFunctions(const SourceFileAttributes& attributes,
700-
bool verbose) {}
699+
virtual void doWriteFunctions(const SourceFileAttributes&, bool) {}
701700
std::string getHeaderGuard() const;
702701

703702
private:
@@ -2002,7 +2001,7 @@ namespace attributes {
20022001

20032002
void CppExportsIncludeGenerator::doWriteFunctions(
20042003
const SourceFileAttributes& attributes,
2005-
bool verbose) {
2004+
bool) {
20062005

20072006
// don't write anything if there is no C++ interface
20082007
if (!attributes.hasInterface(kInterfaceCpp))
@@ -2180,9 +2179,7 @@ namespace attributes {
21802179
}
21812180
}
21822181

2183-
bool CppPackageIncludeGenerator::commit(
2184-
const std::vector<std::string>& includes) {
2185-
2182+
bool CppPackageIncludeGenerator::commit(const std::vector<std::string>&) {
21862183
if (hasCppInterface()) {
21872184

21882185
// create the include dir if necessary
@@ -2212,8 +2209,7 @@ namespace attributes {
22122209

22132210
void RExportsGenerator::doWriteFunctions(
22142211
const SourceFileAttributes& attributes,
2215-
bool verbose) {
2216-
2212+
bool) {
22172213
// write standalone roxygen chunks
22182214
const std::vector<std::vector<std::string> >& roxygenChunks =
22192215
attributes.roxygenChunks();
@@ -2282,7 +2278,7 @@ namespace attributes {
22822278
}
22832279
}
22842280

2285-
bool RExportsGenerator::commit(const std::vector<std::string>& includes) {
2281+
bool RExportsGenerator::commit(const std::vector<std::string>&) {
22862282
return ExportsGenerator::commit();
22872283
}
22882284

0 commit comments

Comments
 (0)