Make ExecutingAttack a local variable while being used, to ensure it's always cleaned up.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -9,3 +9,15 @@
|
||||
next->hookName(__VA_ARGS__); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define HOOK_LOCAL(hookName, source, ...) \
|
||||
{ \
|
||||
auto aggregator = source.GetScriptIterator(); \
|
||||
aggregator.Reset(); \
|
||||
while (aggregator.HasNext()) { \
|
||||
auto next = aggregator.GetNext(); \
|
||||
if (next == nullptr) \
|
||||
continue; \
|
||||
next->hookName(__VA_ARGS__); \
|
||||
} \
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user