Codechange: Use EnumBitSet for ScriptConfigFlags. (#13669)

This commit is contained in:
Peter Nelson
2025-02-28 18:57:40 +00:00
committed by GitHub
parent e70f20a781
commit 94783fe2ed
7 changed files with 39 additions and 38 deletions

View File

@@ -177,7 +177,7 @@ SQInteger ScriptInfo::AddSetting(HSQUIRRELVM vm)
}
/* Make sure all properties are defined */
uint mask = (config.flags & SCRIPTCONFIG_BOOLEAN) ? 0x1F3 : 0x1FF;
uint mask = config.flags.Test(ScriptConfigFlag::Boolean) ? 0x1F3 : 0x1FF;
if (items != mask) {
this->engine->ThrowError("please define all properties of a setting (min/max not allowed for booleans)");
return SQ_ERROR;