Skip to content
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

Fix gcc compiler warning about shadowing parameters #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
14 changes: 7 additions & 7 deletions include/indicators/details/stream_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ inline std::ostream &write_duration(std::ostream &os, std::chrono::nanoseconds n

class BlockProgressScaleWriter {
public:
BlockProgressScaleWriter(std::ostream &os, size_t bar_width) : os(os), bar_width(bar_width) {}
BlockProgressScaleWriter(std::ostream &_os, size_t _bar_width) : os(_os), bar_width(_bar_width) {}

std::ostream &write(float progress) {
std::string fill_text{"█"};
Expand All @@ -132,9 +132,9 @@ class BlockProgressScaleWriter {

class ProgressScaleWriter {
public:
ProgressScaleWriter(std::ostream &os, size_t bar_width, const std::string &fill,
const std::string &lead, const std::string &remainder)
: os(os), bar_width(bar_width), fill(fill), lead(lead), remainder(remainder) {}
ProgressScaleWriter(std::ostream &_os, size_t _bar_width, const std::string &_fill,
const std::string &_lead, const std::string &_remainder)
: os(_os), bar_width(_bar_width), fill(_fill), lead(_lead), remainder(_remainder) {}

std::ostream &write(float progress) {
auto pos = static_cast<size_t>(progress * bar_width / 100.0);
Expand Down Expand Up @@ -176,9 +176,9 @@ class ProgressScaleWriter {

class IndeterminateProgressScaleWriter {
public:
IndeterminateProgressScaleWriter(std::ostream &os, size_t bar_width, const std::string &fill,
const std::string &lead)
: os(os), bar_width(bar_width), fill(fill), lead(lead) {}
IndeterminateProgressScaleWriter(std::ostream &_os, size_t _bar_width, const std::string &_fill,
const std::string &_lead)
: os(_os), bar_width(_bar_width), fill(_fill), lead(_lead) {}

std::ostream &write(size_t progress) {
for (size_t i = 0; i < bar_width;) {
Expand Down