fix invalid default initialization in SettingsMap

This commit is contained in:
Lion Kortlepel 2024-05-24 09:07:54 +02:00
parent d30dccc94a
commit 04e8d00daa
No known key found for this signature in database
GPG Key ID: 4322FF2B4C71259B

View File

@ -86,17 +86,18 @@ struct Settings {
}; };
Sync<std::unordered_map<Key, SettingsTypeVariant>> SettingsMap = std::unordered_map<Key, SettingsTypeVariant> { Sync<std::unordered_map<Key, SettingsTypeVariant>> SettingsMap = std::unordered_map<Key, SettingsTypeVariant> {
{ General_Description, "BeamMP Default Description" }, // All entries which contain std::strings must be explicitly constructed, otherwise they become 'bool'
{ General_Tags, "Freeroam" }, { General_Description, std::string("BeamMP Default Description") },
{ General_Tags, std::string("Freeroam") },
{ General_MaxPlayers, 8 }, { General_MaxPlayers, 8 },
{ General_Name, "BeamMP Server" }, { General_Name, std::string("BeamMP Server") },
{ General_Map, "/levels/gridmap_v2/info.json" }, { General_Map, std::string("/levels/gridmap_v2/info.json") },
{ General_AuthKey, "" }, { General_AuthKey, std::string("") },
{ General_Private, true }, { General_Private, true },
{ General_Port, 30814 }, { General_Port, 30814 },
{ General_MaxCars, 1 }, { General_MaxCars, 1 },
{ General_LogChat, true }, { General_LogChat, true },
{ General_ResourceFolder, "Resources" }, { General_ResourceFolder, std::string("Resources") },
{ General_Debug, false }, { General_Debug, false },
{ Misc_SendErrorsShowMessage, true }, { Misc_SendErrorsShowMessage, true },
{ Misc_SendErrors, true }, { Misc_SendErrors, true },