Fix -Wshadow warnings in spdlog::sinks::dist_sink (#2599)

This is similar to fbba6dff20 but fixes a
few member functions missed in that commit.
This commit is contained in:
Robin Lindén 2023-01-10 00:25:26 +01:00 committed by GitHub
parent 0b9ff5210a
commit 6df64c6c34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,16 +31,16 @@ public:
dist_sink(const dist_sink &) = delete;
dist_sink &operator=(const dist_sink &) = delete;
void add_sink(std::shared_ptr<sink> sink)
void add_sink(std::shared_ptr<sink> sub_sink)
{
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
sinks_.push_back(sink);
sinks_.push_back(sub_sink);
}
void remove_sink(std::shared_ptr<sink> sink)
void remove_sink(std::shared_ptr<sink> sub_sink)
{
std::lock_guard<Mutex> lock(base_sink<Mutex>::mutex_);
sinks_.erase(std::remove(sinks_.begin(), sinks_.end(), sink), sinks_.end());
sinks_.erase(std::remove(sinks_.begin(), sinks_.end(), sub_sink), sinks_.end());
}
void set_sinks(std::vector<std::shared_ptr<sink>> sinks)