From 70ac3813cf0245e9fece3d8b5fd7ab6c8fc0b483 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sun, 21 Nov 2021 13:29:29 +0100 Subject: [PATCH] Cleanup of script hooks to reduce clang warnings. --- src/Battling/ScriptHandling/ScriptMacros.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Battling/ScriptHandling/ScriptMacros.hpp b/src/Battling/ScriptHandling/ScriptMacros.hpp index c127ad5..e1420e6 100644 --- a/src/Battling/ScriptHandling/ScriptMacros.hpp +++ b/src/Battling/ScriptHandling/ScriptMacros.hpp @@ -2,7 +2,7 @@ { \ try { \ auto aggregator = (source)->GetScriptIterator(); \ - ArbUt::BorrowedPtr next = (CreatureLib::Battling::BattleScript*)1; \ + ArbUt::BorrowedPtr next; \ while (aggregator.GetNext(next)) { \ if (next->IsSuppressed()) { \ continue; \ @@ -25,11 +25,11 @@ try { \ if (scriptWrapper.HasValue()) { \ if (scriptWrapper.IsSet()) { \ - for (const auto& sv : scriptWrapper.GetScriptSet()->GetIterator()) { \ - if (sv->IsSuppressed()) { \ + for (const auto& scriptIterator : scriptWrapper.GetScriptSet()->GetIterator()) { \ + if (scriptIterator->IsSuppressed()) { \ continue; \ } \ - sv->hookName(__VA_ARGS__); \ + scriptIterator->hookName(__VA_ARGS__); \ } \ } else { \ if (scriptWrapper.GetScript()->get()->IsSuppressed()) { \