mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-24 06:32:06 +08:00
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:
parent
0b9ff5210a
commit
6df64c6c34
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user