Fix clang-tidy modernize-use-default-member-init findings

This commit is contained in:
Tim Wojtulewicz 2025-05-16 10:02:59 -07:00
parent 0227e3a545
commit 3943e64372
4 changed files with 21 additions and 38 deletions

View file

@ -51,16 +51,16 @@ static void input_hash_delete_func(void* val) {
class Manager::Stream {
public:
string name;
bool removed;
bool removed = false;
StreamType stream_type; // to distinguish between event and table streams
EnumVal* type;
ReaderFrontend* reader;
TableVal* config;
EnumVal* type = nullptr;
ReaderFrontend* reader = nullptr;
TableVal* config = nullptr;
EventHandlerPtr error_event;
RecordVal* description;
RecordVal* description = nullptr;
virtual ~Stream();
@ -68,8 +68,7 @@ protected:
Stream(StreamType t);
};
Manager::Stream::Stream(StreamType t)
: name(), removed(), stream_type(t), type(), reader(), config(), error_event(), description() {}
Manager::Stream::Stream(StreamType t) : stream_type(t) {}
Manager::Stream::~Stream() {
Unref(type);
@ -80,18 +79,18 @@ Manager::Stream::~Stream() {
class Manager::TableStream final : public Manager::Stream {
public:
unsigned int num_idx_fields;
unsigned int num_val_fields;
bool want_record;
unsigned int num_idx_fields = 0;
unsigned int num_val_fields = 0;
bool want_record = false;
TableVal* tab;
RecordType* rtype;
RecordType* itype;
TableVal* tab = nullptr;
RecordType* rtype = nullptr;
RecordType* itype = nullptr;
PDict<InputHash>* currDict;
PDict<InputHash>* lastDict;
PDict<InputHash>* currDict = nullptr;
PDict<InputHash>* lastDict = nullptr;
Func* pred;
Func* pred = nullptr;
EventHandlerPtr event;
@ -103,7 +102,7 @@ class Manager::EventStream final : public Manager::Stream {
public:
EventHandlerPtr event;
RecordType* fields;
RecordType* fields = nullptr;
unsigned int num_fields;
bool want_record;
@ -119,21 +118,9 @@ public:
~AnalysisStream() override = default;
};
Manager::TableStream::TableStream()
: Manager::Stream::Stream(TABLE_STREAM),
num_idx_fields(),
num_val_fields(),
want_record(),
tab(),
rtype(),
itype(),
currDict(),
lastDict(),
pred(),
event() {}
Manager::TableStream::TableStream() : Manager::Stream::Stream(TABLE_STREAM) {}
Manager::EventStream::EventStream()
: Manager::Stream::Stream(EVENT_STREAM), event(), fields(), num_fields(), want_record() {}
Manager::EventStream::EventStream() : Manager::Stream::Stream(EVENT_STREAM) {}
Manager::EventStream::~EventStream() {
if ( fields )