Split utility headers

This commit is contained in:
WarmUpTill
2024-01-21 00:08:06 +01:00
committed by WarmUpTill
parent 8b9f3064ba
commit cf5f338902
153 changed files with 1513 additions and 1294 deletions

View File

@@ -129,4 +129,21 @@ void ResetMacroRunCount(Macro *macro)
macro->ResetRunCount();
}
bool IsValidMacroSegmentIndex(Macro *m, const int idx, bool isCondition)
{
if (!m || idx < 0) {
return false;
}
if (isCondition) {
if (idx >= (int)m->Conditions().size()) {
return false;
}
} else {
if (idx >= (int)m->Actions().size()) {
return false;
}
}
return true;
}
} // namespace advss