Fix clang-tidy modernize-use-bool-literals warnings in headers

This commit is contained in:
Tim Wojtulewicz 2025-06-10 08:37:41 -07:00
parent ed202b36b2
commit a05b4abdf7
4 changed files with 4 additions and 4 deletions

View file

@ -351,7 +351,7 @@ public:
protected:
BuiltinFunc() {
func = nullptr;
is_pure = 0;
is_pure = false;
}
built_in_func func;

View file

@ -44,7 +44,7 @@ public:
bool Undelivered(int64_t len);
int64_t BodyLength() const { return body_length; }
int64_t HeaderLength() const { return header_length; }
void SkipBody() { deliver_body = 0; }
void SkipBody() { deliver_body = false; }
const std::string& FileID() const { return precomputed_file_id; }
protected:

View file

@ -50,7 +50,7 @@ public:
void ConnectionFinished(bool half_finished) override;
void Undelivered(uint64_t seq, int len, bool orig) override;
void SkipData() { skip_data = 1; } // skip delivery of data lines
void SkipData() { skip_data = true; } // skip delivery of data lines
static analyzer::Analyzer* Instantiate(Connection* conn) { return new SMTP_Analyzer(conn); }

View file

@ -323,7 +323,7 @@ public:
/**
* Converts the value to a Boolean.
*/
[[nodiscard]] bool ToBool(bool fallback = 0) const noexcept {
[[nodiscard]] bool ToBool(bool fallback = false) const noexcept {
if ( auto val = broker::get_if<bool>(value_); val ) {
return *val;
}