mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 22:34:33 +01:00
Add static assert to check config enum type
This commit is contained in:
@@ -31,6 +31,8 @@ interface IIniWriter
|
||||
|
||||
template<typename T> void WriteEnum(const std::string& name, T value, const IConfigEnum<T>& configEnum)
|
||||
{
|
||||
static_assert(sizeof(T) <= sizeof(int32_t), "Type too large");
|
||||
|
||||
std::string key = configEnum.GetName(value);
|
||||
if (key.empty())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user