Skip to content

Commit 9c8c59a

Browse files
fix(code-quality): comment-out unused parameters
1 parent 67f0182 commit 9c8c59a

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

cpp/sopt/primal_dual.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ class PrimalDual {
244244
//!
245245
//! This function simplifies creating overloads for operator() in PD wrappers.
246246
static std::tuple<t_Vector, t_Vector> initial_guess(t_Vector const &target,
247-
t_LinearTransform const &phi, Real nu) {
247+
t_LinearTransform const &phi, Real /*nu*/) {
248248
std::tuple<t_Vector, t_Vector> guess;
249249
std::get<0>(guess) = static_cast<t_Vector>(phi.adjoint() * target);
250250
std::get<1>(guess) = target;

cpp/sopt/proximal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void tv_norm(Eigen::DenseBase<T0> &out, Eigen::DenseBase<T2> const &gamma,
132132

133133
//! Proximal of a function that is always zero, the identity
134134
template <class T0, class T1>
135-
void id(Eigen::DenseBase<T0> &out, typename real_type<typename T0::Scalar>::type gamma,
135+
void id(Eigen::DenseBase<T0> &out, typename real_type<typename T0::Scalar>::type /*gamma*/,
136136
Eigen::DenseBase<T1> const &x) {
137137
out = x;
138138
}

cpp/sopt/tf_g_proximal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class TFGProximal : public GProximal<SCALAR> {
6363

6464
// Return g_proximal as a lambda function. Used in operator() in base class.
6565
t_Proximal proximal_function() const override {
66-
return [this](t_Vector &out, Real gamma, t_Vector const &x) {
66+
return [this](t_Vector &out, Real /*gamma*/, t_Vector const &x) {
6767
this -> call_model(out, x);
6868
};
6969
}

cpp/sopt/wavelets.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Vector<T> &get_wavelet_basis_coefficients(Vector<T> &coeffs, const t_uint basis_
108108
return coeffs.segment(basis_index * size, size);
109109
}
110110
template <class T>
111-
Vector<T> &get_wavelet_levels_1d(Vector<T> &coeffs, const t_uint level, const t_uint size) {
111+
Vector<T> &get_wavelet_levels_1d(Vector<T> &coeffs, const t_uint level, const t_uint /*size*/) {
112112
auto const N = static_cast<t_uint>(coeffs.size()) >> level; // bitshift to divide by 2^level
113113
return coeffs.head(N);
114114
}

cpp/tests/credible_region.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ t_uint N = rows * cols;
1414

1515
TEST_CASE("calculating gamma") {
1616
sopt::logging::set_level("debug");
17-
const std::function<t_real(t_Vector)> energy_function = [](const t_Vector &input) -> t_real {
17+
const std::function<t_real(t_Vector)> energy_function = [](const t_Vector & /*input*/) -> t_real {
1818
return 0.;
1919
};
2020
const t_Vector x = t_Vector::Random(N);

cpp/tests/forward_backward.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ TEST_CASE("Forward Backward with ||x - x0||_2^2 function", "[fb]") {
3939
auto const grad = [](t_Vector &out, const t_Vector &x) { out = x; };
4040
const t_Vector x_guess = t_Vector::Random(target0.size());
4141
const t_Vector res = x_guess - target0;
42-
auto const convergence = [&target0](const t_Vector &x, const t_Vector &res) -> bool {
42+
auto const convergence = [&target0](const t_Vector &x, const t_Vector & /*res*/) -> bool {
4343
return x.isApprox(target0, 1e-9);
4444
};
4545
CAPTURE(target0);

cpp/tests/primal_dual.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ TEST_CASE("Primal Dual with 0.5 * ||x - x0||_2^2 function", "[primaldual]") {
6060
auto const g = proximal::L2Norm<Scalar>();
6161
const t_Vector x_guess = t_Vector::Random(target0.size());
6262
const t_Vector res = x_guess - target0;
63-
auto const convergence = [&target0](const t_Vector &x, const t_Vector &res) -> bool {
63+
auto const convergence = [&target0](const t_Vector &x, const t_Vector & /*res*/) -> bool {
6464
return x.isApprox(target0, 1e-9);
6565
};
6666
CAPTURE(target0);

0 commit comments

Comments
 (0)