From 8725b37a358cf27c144d7b606fa8f126d61ee52d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 3 Aug 2020 10:31:57 -0400 Subject: logging/backend: Make use of designated initializers Same behavior, less code. --- src/common/logging/backend.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/common/logging/backend.h') diff --git a/src/common/logging/backend.h b/src/common/logging/backend.h index fc338c70d..e5d702568 100644 --- a/src/common/logging/backend.h +++ b/src/common/logging/backend.h @@ -21,19 +21,13 @@ class Filter; */ struct Entry { std::chrono::microseconds timestamp; - Class log_class; - Level log_level; - const char* filename; - unsigned int line_num; + Class log_class{}; + Level log_level{}; + const char* filename = nullptr; + unsigned int line_num = 0; std::string function; std::string message; bool final_entry = false; - - Entry() = default; - Entry(Entry&& o) = default; - - Entry& operator=(Entry&& o) = default; - Entry& operator=(const Entry& o) = default; }; /** -- cgit v1.2.3