From 11bc8c4c05c7037f513c93419d5bcba8d3a45431 Mon Sep 17 00:00:00 2001 From: Alvin Zhu Date: Wed, 22 Mar 2023 14:39:40 +0800 Subject: [PATCH] fix build for clang --- src/strategy/values/SpellIdValue.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/strategy/values/SpellIdValue.cpp b/src/strategy/values/SpellIdValue.cpp index 5d084cb..f6cb6f8 100644 --- a/src/strategy/values/SpellIdValue.cpp +++ b/src/strategy/values/SpellIdValue.cpp @@ -3,8 +3,6 @@ */ #include "SpellIdValue.h" - -#include #include "ChatHelper.h" #include "Playerbots.h" #include "Vehicle.h" @@ -104,8 +102,9 @@ uint32 SpellIdValue::Calculate() uint32 lowestSpellId = 0; if (saveMana <= 1) { - for (uint32 spellId : std::ranges::reverse_view(spellIds)) + for (auto it = spellIds.rbegin(); it != spellIds.rend(); ++it) { + auto spellId = *it; const SpellInfo *pSpellInfo = sSpellMgr->GetSpellInfo(spellId); if (!pSpellInfo) continue; @@ -144,8 +143,9 @@ uint32 SpellIdValue::Calculate() } else { - for (uint32 spellId : std::ranges::reverse_view(spellIds)) + for (auto it = spellIds.rbegin(); it != spellIds.rend(); ++it) { + auto spellId = *it; if (!highestSpellId) highestSpellId = spellId; if (saveMana == rank)