Move ScriptIterator reset to get call instead of inside Macro.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
f898698f49
commit
dba1275813
|
@ -1,7 +1,6 @@
|
||||||
#define HOOK(hookName, source, ...) \
|
#define HOOK(hookName, source, ...) \
|
||||||
{ \
|
{ \
|
||||||
auto aggregator = source->GetScriptIterator(); \
|
auto aggregator = source->GetScriptIterator(); \
|
||||||
aggregator.Reset(); \
|
|
||||||
while (aggregator.HasNext()) { \
|
while (aggregator.HasNext()) { \
|
||||||
auto next = aggregator.GetNext(); \
|
auto next = aggregator.GetNext(); \
|
||||||
if (next == nullptr) \
|
if (next == nullptr) \
|
||||||
|
@ -13,7 +12,6 @@
|
||||||
#define HOOK_LOCAL(hookName, source, ...) \
|
#define HOOK_LOCAL(hookName, source, ...) \
|
||||||
{ \
|
{ \
|
||||||
auto aggregator = source.GetScriptIterator(); \
|
auto aggregator = source.GetScriptIterator(); \
|
||||||
aggregator.Reset(); \
|
|
||||||
while (aggregator.HasNext()) { \
|
while (aggregator.HasNext()) { \
|
||||||
auto next = aggregator.GetNext(); \
|
auto next = aggregator.GetNext(); \
|
||||||
if (next == nullptr) \
|
if (next == nullptr) \
|
||||||
|
|
|
@ -24,6 +24,7 @@ namespace CreatureLib::Battling {
|
||||||
_scriptsIterator = ScriptAggregator(_scripts);
|
_scriptsIterator = ScriptAggregator(_scripts);
|
||||||
_areScriptsInitialized = true;
|
_areScriptsInitialized = true;
|
||||||
}
|
}
|
||||||
|
_scriptsIterator.Reset();
|
||||||
return _scriptsIterator;
|
return _scriptsIterator;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue