From 0a380ece6cb346d9de7b973ce0ab2ba200f257c4 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sun, 16 Mar 2025 11:43:13 +0100 Subject: [PATCH] refactor(logger): add clang-tidy exception --- include/dwarfs/logger.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/dwarfs/logger.h b/include/dwarfs/logger.h index 8912bf6a..53ecc484 100644 --- a/include/dwarfs/logger.h +++ b/include/dwarfs/logger.h @@ -143,7 +143,8 @@ class level_log_entry { ~level_log_entry() { lgr_.write(level_, oss_.str(), loc_); } template - level_log_entry& operator<<(const T& val) { + level_log_entry& operator<<(T const& val) { + // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay) oss_ << val; return *this; } @@ -163,9 +164,10 @@ class timed_level_log_entry { ~timed_level_log_entry(); template - timed_level_log_entry& operator<<(const T& val) { + timed_level_log_entry& operator<<(T const& val) { if (state_) { output_ = true; + // NOLINTNEXTLINE(cppcoreguidelines-pro-bounds-array-to-pointer-decay) oss_ << val; } return *this;