diff options
author | Treeston <treeston.mmoc@gmail.com> | 2018-10-26 17:42:29 +0200 |
---|---|---|
committer | Treeston <treeston.mmoc@gmail.com> | 2018-10-26 17:42:29 +0200 |
commit | f7ca0877a3736000a6e3b4ed09ac5f08b4d8e3f0 (patch) | |
tree | e28d7f2d74a558cbe90fa2e78fd35a7adcc67412 /src/common/Utilities/SmartEnum.h | |
parent | 338e8ba0fea8b4b15120c96fff15a6c4b1a52593 (diff) |
338e8ba follow-up (more constexpr)
Diffstat (limited to 'src/common/Utilities/SmartEnum.h')
-rw-r--r-- | src/common/Utilities/SmartEnum.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/Utilities/SmartEnum.h b/src/common/Utilities/SmartEnum.h index 3ee19438d51..99b4aa06e9d 100644 --- a/src/common/Utilities/SmartEnum.h +++ b/src/common/Utilities/SmartEnum.h @@ -22,19 +22,19 @@ struct EnumText { - EnumText(char const* t = nullptr, char const* d = nullptr) : Title(t), Description(d ? d : t) {} + constexpr EnumText(char const* t = nullptr, char const* d = nullptr) : Title(t), Description(d ? d : t) {} // Human-readable title of the value char const* const Title; // Human-readable description of the value char const* const Description; protected: - EnumText(char const* n, EnumText e) : Title(e.Title ? e.Title : n), Description(e.Description ? e.Description : Title) {} + constexpr EnumText(char const* n, EnumText e) : Title(e.Title ? e.Title : n), Description(e.Description ? e.Description : Title) {} }; struct FullEnumText : public EnumText { - FullEnumText(char const* constant, EnumText e) : EnumText(constant, e), Constant(constant) {} + constexpr FullEnumText(char const* constant, EnumText e) : EnumText(constant, e), Constant(constant) {} // Enum constant of the value char const* const Constant; }; |