don't use vector for GetPluginOptions (usable with other languages now)

This commit is contained in:
somewhatlurker
2019-08-30 00:16:35 +10:00
parent be8572d20c
commit 38f17ce692
5 changed files with 29 additions and 13 deletions
@@ -40,12 +40,16 @@ namespace PluginConfig
}
}
std::vector<ConfigOptionBase*> GetConfigOptionVec(std::vector<PluginConfigOption> &in)
std::vector<ConfigOptionBase*> GetConfigOptionVec(PluginConfigArray &in)
{
std::vector<ConfigOptionBase*> outvec;
for (PluginConfigOption &opt : in)
for (int i = 0; i < in.len; i++)
{
outvec.push_back(GetConfigOption(opt));
// basic check for validity
if (in.options[i].data == nullptr)
break;
outvec.push_back(GetConfigOption(in.options[i]));
}
return outvec;
}