mirror of
https://github.com/gabime/spdlog.git
synced 2026-01-19 04:52:09 +00:00
The upd_sink and dist_sink files have been modified to address Passed by value warnings. (#3520)
This commit is contained in:
@@ -24,7 +24,7 @@ class dist_sink : public base_sink<Mutex> {
|
||||
public:
|
||||
dist_sink() = default;
|
||||
explicit dist_sink(std::vector<std::shared_ptr<sink>> sinks)
|
||||
: sinks_(sinks) {}
|
||||
: sinks_(std::move(sinks)) {}
|
||||
|
||||
dist_sink(const dist_sink &) = delete;
|
||||
dist_sink &operator=(const dist_sink &) = delete;
|
||||
|
||||
@@ -36,7 +36,7 @@ template <typename Mutex>
|
||||
class udp_sink : public spdlog::sinks::base_sink<Mutex> {
|
||||
public:
|
||||
// host can be hostname or ip address
|
||||
explicit udp_sink(udp_sink_config sink_config)
|
||||
explicit udp_sink(const udp_sink_config& sink_config)
|
||||
: client_{sink_config.server_host, sink_config.server_port} {}
|
||||
|
||||
~udp_sink() override = default;
|
||||
|
||||
Reference in New Issue
Block a user