Skip to content

Code-quality: comment-out unused parameters #401

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cpp/sopt/primal_dual.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class PrimalDual {
//!
//! This function simplifies creating overloads for operator() in PD wrappers.
static std::tuple<t_Vector, t_Vector> initial_guess(t_Vector const &target,
t_LinearTransform const &phi, Real nu) {
t_LinearTransform const &phi, Real /*nu*/) {
std::tuple<t_Vector, t_Vector> guess;
std::get<0>(guess) = static_cast<t_Vector>(phi.adjoint() * target);
std::get<1>(guess) = target;
Expand Down
2 changes: 1 addition & 1 deletion cpp/sopt/proximal.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void tv_norm(Eigen::DenseBase<T0> &out, Eigen::DenseBase<T2> const &gamma,

//! Proximal of a function that is always zero, the identity
template <class T0, class T1>
void id(Eigen::DenseBase<T0> &out, typename real_type<typename T0::Scalar>::type gamma,
void id(Eigen::DenseBase<T0> &out, typename real_type<typename T0::Scalar>::type /*gamma*/,
Eigen::DenseBase<T1> const &x) {
out = x;
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/sopt/tf_g_proximal.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class TFGProximal : public GProximal<SCALAR> {

// Return g_proximal as a lambda function. Used in operator() in base class.
t_Proximal proximal_function() const override {
return [this](t_Vector &out, Real gamma, t_Vector const &x) {
return [this](t_Vector &out, Real /*gamma*/, t_Vector const &x) {
this -> call_model(out, x);
};
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/sopt/wavelets.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Vector<T> &get_wavelet_basis_coefficients(Vector<T> &coeffs, const t_uint basis_
return coeffs.segment(basis_index * size, size);
}
template <class T>
Vector<T> &get_wavelet_levels_1d(Vector<T> &coeffs, const t_uint level, const t_uint size) {
Vector<T> &get_wavelet_levels_1d(Vector<T> &coeffs, const t_uint level, const t_uint /*size*/) {
auto const N = static_cast<t_uint>(coeffs.size()) >> level; // bitshift to divide by 2^level
return coeffs.head(N);
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/credible_region.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ t_uint N = rows * cols;

TEST_CASE("calculating gamma") {
sopt::logging::set_level("debug");
const std::function<t_real(t_Vector)> energy_function = [](const t_Vector &input) -> t_real {
const std::function<t_real(t_Vector)> energy_function = [](const t_Vector & /*input*/) -> t_real {
return 0.;
};
const t_Vector x = t_Vector::Random(N);
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/forward_backward.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ TEST_CASE("Forward Backward with ||x - x0||_2^2 function", "[fb]") {
auto const grad = [](t_Vector &out, const t_Vector &x) { out = x; };
const t_Vector x_guess = t_Vector::Random(target0.size());
const t_Vector res = x_guess - target0;
auto const convergence = [&target0](const t_Vector &x, const t_Vector &res) -> bool {
auto const convergence = [&target0](const t_Vector &x, const t_Vector & /*res*/) -> bool {
return x.isApprox(target0, 1e-9);
};
CAPTURE(target0);
Expand Down
2 changes: 1 addition & 1 deletion cpp/tests/primal_dual.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TEST_CASE("Primal Dual with 0.5 * ||x - x0||_2^2 function", "[primaldual]") {
auto const g = proximal::L2Norm<Scalar>();
const t_Vector x_guess = t_Vector::Random(target0.size());
const t_Vector res = x_guess - target0;
auto const convergence = [&target0](const t_Vector &x, const t_Vector &res) -> bool {
auto const convergence = [&target0](const t_Vector &x, const t_Vector & /*res*/) -> bool {
return x.isApprox(target0, 1e-9);
};
CAPTURE(target0);
Expand Down