Skip to content

Commit 3fb13fb

Browse files
committed
fix: initialize hook field in LogEntryContent constructor to fix clang-tidy warning
cppcoreguidelines-pro-type-member-init: constructor does not initialize field 'hook' in taxi/uservices/userver/universal/src/logging/dynamic_debug.hpp. Add explicit default initialization of LogEntryContentHook hook{} in the member initializer list. This fixes errors introduced in rXXXXXX. commit_hash:08b7abca0fd3dba3f1e28cb43743e8b4461d2df9
1 parent 0d5bfc5 commit 3fb13fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

universal/src/logging/dynamic_debug.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static_assert(std::atomic<EntryState>::is_always_lock_free);
2828
using LogEntryContentHook = bi::set_base_hook<bi::optimize_size<true>, bi::link_mode<bi::normal_link>>;
2929

3030
struct LogEntryContent {
31-
LogEntryContent(const char* path, int line) noexcept : line(line), path(path) {}
31+
LogEntryContent(const char* path, int line) noexcept : line(line), path(path), hook{} {}
3232

3333
std::atomic<EntryState> state{EntryState{}};
3434
const int line;

0 commit comments

Comments
 (0)