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. --- include/ctables.h | 6 ++++-- include/modules/regex.h | 3 ++- include/users.h | 6 ++++-- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/ctables.h b/include/ctables.h index d29360e94..63dc2c36c 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -27,7 +27,8 @@ #pragma once /** Used to indicate the type of a command. */ -enum class CmdAccess : uint8_t +enum class CmdAccess + : uint8_t { /* The command has no special attributes. */ NORMAL = 0, @@ -40,7 +41,8 @@ enum class CmdAccess : uint8_t }; /** Used to indicate the result of trying to execute a command. */ -enum class CmdResult : uint8_t +enum class CmdResult + : uint8_t { /** The command exists and its execution succeeded. */ SUCCESS = 0, diff --git a/include/modules/regex.h b/include/modules/regex.h index 2fc0b2b4a..acb14e480 100644 --- a/include/modules/regex.h +++ b/include/modules/regex.h @@ -37,7 +37,8 @@ namespace Regex typedef std::shared_ptr PatternPtr; /** The options to use when matching a pattern. */ - enum PatternOptions : uint8_t + enum PatternOptions + : uint8_t { /** No special matching options apply. */ OPT_NONE = 0, diff --git a/include/users.h b/include/users.h index 484b24156..a249b6da6 100644 --- a/include/users.h +++ b/include/users.h @@ -62,7 +62,8 @@ public: typedef std::shared_ptr Ptr; /** An enumeration of possible types of connect class. */ - enum Type : uint8_t + enum Type + : uint8_t { /** The class defines who is allowed to connect to the server. */ ALLOW = 0, @@ -282,7 +283,8 @@ public: }; /** An enumeration of all possible types of user. */ - enum Type : uint8_t + enum Type + : uint8_t { /** The user is connected to the local server. */ TYPE_LOCAL = 0, -- cgit v1.3.1-10-gc9f91