fix: keep amendment default member initializer, silence clang-tidy

This commit is contained in:
Mayukha Vadari
2026-08-11 13:46:08 -04:00
parent 5fa63a15c9
commit 0b8260725b
2 changed files with 8 additions and 2 deletions

View File

@@ -71,7 +71,13 @@ struct TxSettings
/**
* The amendment gating this transaction, or uint256{} if always available.
*/
uint256 amendment;
// The `{}` looks redundant, because BaseUInt's default constructor already
// zeroes the value. It is not: without a default member initializer here,
// every partial designated initializer in transactions.macro trips the
// missing-designated-field-initializers warning, which the build treats as
// an error.
// NOLINTNEXTLINE(readability-redundant-member-init)
uint256 amendment{};
/**
* Operations this transaction is permitted to perform.

View File

@@ -21,7 +21,7 @@
* struct TxSettings
* {
* Delegation delegable = Delegable;
* uint256 amendment;
* uint256 amendment{};
* Privilege privileges = NoPriv;
* };
*