[style] use constexpr instead of anonymous enum for constants (#11161)

This commit updates a few remaining places where anonymous enums were
used to declare constants, replacing them with `static constexpr`.
This commit is contained in:
Abtin Keshavarzian
2025-01-15 11:05:15 -08:00
committed by GitHub
parent b8c4545656
commit 0e1c9a79a3
7 changed files with 18 additions and 39 deletions
+3 -6
View File
@@ -39,12 +39,9 @@ namespace ot {
void TestMessage(void)
{
enum : uint16_t
{
kMaxSize = (kBufferSize * 3 + 24),
kOffsetStep = 101,
kLengthStep = 21,
};
static constexpr uint16_t kMaxSize = (kBufferSize * 3 + 24);
static constexpr uint16_t kOffsetStep = 101;
static constexpr uint16_t kLengthStep = 21;
Instance *instance;
MessagePool *messagePool;