From e7f01128f181a7b754f6d5f94122cde059c7ed1a Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Wed, 21 Jun 2023 21:41:06 -0400 Subject: settings: Give indices to enums --- src/common/settings_common.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/common/settings_common.h') diff --git a/src/common/settings_common.h b/src/common/settings_common.h index 669d32204..b355384a4 100644 --- a/src/common/settings_common.h +++ b/src/common/settings_common.h @@ -220,6 +220,11 @@ public: */ [[nodiscard]] virtual constexpr bool Ranged() const = 0; + /** + * @returns The index of the enum if the underlying setting type is an enum, else max of u32. + */ + [[nodiscard]] virtual constexpr u32 EnumIndex() const = 0; + /* * Switchable settings */ -- cgit v1.2.3