1
0
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:
Matt Thomson
2020-08-05 20:48:02 +01:00
parent 150100d89f
commit 788bc1581c

View File

@@ -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())
{