mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-10-28 19:40:22 -05:00
Select variables used by exported macros by default in export dialog
This commit is contained in:
@@ -41,4 +41,18 @@ std::unordered_map<std::string, int> GetVariablesUsedByMacro(Macro *macro)
|
||||
return collectReferences(macro);
|
||||
}
|
||||
|
||||
std::unordered_map<std::string, int>
|
||||
GetVariablesUsedByMacros(const std::vector<std::shared_ptr<Macro>> ¯os)
|
||||
{
|
||||
std::unordered_map<std::string, int> result;
|
||||
auto lock = LockContext();
|
||||
for (const auto ¯o : macros) {
|
||||
for (const auto &[name, count] :
|
||||
collectReferences(macro.get())) {
|
||||
result[name] += count;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
||||
Reference in New Issue
Block a user