Core/Misc: Fixed clang pch build on some distros

Closes #27343
This commit is contained in:
Shauren
2022-02-06 19:04:53 +01:00
parent b5a67cf17d
commit 34024edcaa

View File

@@ -338,9 +338,12 @@ constexpr SpellSchoolMask GetMaskForSchool(SpellSchools school)
inline SpellSchools GetFirstSchoolInMask(SpellSchoolMask mask)
{
for (SpellSchools school : EnumUtils::Iterate<SpellSchools>())
if (mask & GetMaskForSchool(school))
return school;
// Do not use EnumUtils to iterate
// this can cause some compilers to instantiate Trinity::Impl::EnumUtils<SpellSchools>
// when compiling enuminfo_SharedDefines before their explicit specializations in that file
for (uint16 i = 0; i < MAX_SPELL_SCHOOL; ++i)
if (mask & (1 << i))
return SpellSchools(i);
return SPELL_SCHOOL_NORMAL;
}