From 081b0e53e3adca7ea57d23e5fcd9db4b86415a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A8le=20Oul=C3=A8s?= Date: Tue, 26 Jul 2022 11:12:53 +0200 Subject: refactor: Make const refs vars where applicable This avoids initializing variables with the copy-constructor of a non-trivially copyable type. --- src/logging.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/logging.cpp') diff --git a/src/logging.cpp b/src/logging.cpp index 1e2c1d5a77..73c4e458bd 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -364,7 +364,7 @@ void BCLog::Logger::LogPrintStr(const std::string& str, const std::string& loggi } if (m_log_threadnames && m_started_new_line) { - const auto threadname = util::ThreadGetInternalName(); + const auto& threadname = util::ThreadGetInternalName(); str_prefixed.insert(0, "[" + (threadname.empty() ? "unknown" : threadname) + "] "); } -- cgit v1.2.3