From 0e7883dd962f16bbac1dd0b4b6a33de3c19ceca1 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 30 Apr 2022 14:47:39 +0100 Subject: Format enums with an underlying type like classes. --- src/modules/m_dnsbl.cpp | 6 ++++-- src/modules/m_knock.cpp | 3 ++- src/modules/m_spanningtree/main.h | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 96f11d8c3..94ded04b4 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -34,7 +34,8 @@ class DNSBLEntry final { public: - enum class Action : uint8_t + enum class Action + : uint8_t { // G-line users who's IP address is in the DNSBL. GLINE, @@ -52,7 +53,8 @@ public: ZLINE, }; - enum class Type : uint8_t + enum class Type + : uint8_t { // DNSBL results will be compared against the specified bit mask. BITMASK, diff --git a/src/modules/m_knock.cpp b/src/modules/m_knock.cpp index 0e347e078..a24019cd8 100644 --- a/src/modules/m_knock.cpp +++ b/src/modules/m_knock.cpp @@ -41,7 +41,8 @@ enum }; // Actions which can be taken when a user knocks on a channel. -enum KnockNotify : uint8_t +enum KnockNotify + : uint8_t { // Send a notice when a user knocks on a channel. KN_SEND_NOTICE = 1, diff --git a/src/modules/m_spanningtree/main.h b/src/modules/m_spanningtree/main.h index 4beabf967..c78bdd4e1 100644 --- a/src/modules/m_spanningtree/main.h +++ b/src/modules/m_spanningtree/main.h @@ -45,7 +45,8 @@ * If you introduce new protocol versions please document them here: * https://docs.inspircd.org/spanningtree/changes */ -enum ProtocolVersion : uint16_t +enum ProtocolVersion + : uint16_t { /** The linking protocol version introduced in InspIRCd v3.0. */ PROTO_INSPIRCD_3 = 1205, -- cgit v1.3.1-10-gc9f91