Fix clang-tidy performance-enum-size warnings in headers

This commit is contained in:
Tim Wojtulewicz 2025-06-09 17:06:52 -07:00
parent 89ac0cb418
commit f386deba94
76 changed files with 184 additions and 136 deletions

View file

@ -70,7 +70,7 @@ class Plugin;
* Hook types that a plugin may define. Each label maps to the corresponding
* virtual method in \a Plugin.
*/
enum HookType {
enum HookType : uint8_t {
// Note: when changing this table, update hook_name() in Plugin.cc.
HOOK_LOAD_FILE, //< Activates Plugin::HookLoadFile().
HOOK_LOAD_FILE_EXT, //< Activates Plugin::HookLoadFileExtended().
@ -192,7 +192,13 @@ public:
/**
* Type of the item.
*/
enum Type { FUNCTION = 1, EVENT = 2, CONSTANT = 3, GLOBAL = 4, TYPE = 5 };
enum Type : uint8_t {
FUNCTION = 1,
EVENT = 2,
CONSTANT = 3,
GLOBAL = 4,
TYPE = 5,
};
/**
* Constructor.
@ -242,7 +248,7 @@ public:
/**
* Type of the argument.
*/
enum Type {
enum Type : uint8_t {
BOOL,
DOUBLE,
EVENT,
@ -669,7 +675,7 @@ public:
/**
* The different types of @loads supported by HookLoadFile.
*/
enum LoadType { SCRIPT, SIGNATURES, PLUGIN };
enum LoadType : uint8_t { SCRIPT, SIGNATURES, PLUGIN };
/**
* Constructor.