2
0
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:
Kağan Can Şit
2026-01-12 10:21:17 +03:00
committed by GitHub
parent f2a9dec029
commit 687226d95d
2 changed files with 2 additions and 2 deletions

View File

@@ -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;

View File

@@ -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;