Fix clang-tidy modernize-use-default-member-init warnings in headers

This commit is contained in:
Tim Wojtulewicz 2025-06-10 09:32:23 -07:00
parent a05b4abdf7
commit fb55c8856e
49 changed files with 134 additions and 185 deletions

View file

@ -60,7 +60,7 @@ public:
*
* Structure takes ownership of string.
*/
const char* path;
const char* path = nullptr;
/**
* The filter this writer is attached to.
@ -79,17 +79,17 @@ public:
/**
* The rotation interval as configured for this writer.
*/
double rotation_interval;
double rotation_interval = 0.0;
/**
* The parsed value of log_rotate_base_time in seconds.
*/
double rotation_base;
double rotation_base = 0.0;
/**
* The network time when the writer is created.
*/
double network_time;
double network_time = 0.0;
/**
* A map of key/value pairs corresponding to the relevant
@ -97,7 +97,7 @@ public:
*/
config_map config;
WriterInfo() : path(nullptr), rotation_interval(0.0), rotation_base(0.0), network_time(0.0) {}
WriterInfo() = default;
WriterInfo(const WriterInfo& other) {
path = other.path ? util::copy_string(other.path) : nullptr;