}
-SourcePackage::Loader::Loader(SourcePackage &p):
+SourcePackage::Loader::Loader(SourcePackage &p, const Config::InputOptions *o):
DataFile::DerivedObjectLoader<SourcePackage, Package::Loader>(p),
- FeatureConditional(p, p.name)
+ FeatureConditional(p, p.name),
+ options(o)
{
- init(0);
-}
-
-SourcePackage::Loader::Loader(SourcePackage &p, const Config::InputOptions &o):
- DataFile::DerivedObjectLoader<SourcePackage, Package::Loader>(p),
- FeatureConditional(p, p.name)
-{
- init(&o);
-}
-
-void SourcePackage::Loader::init(const Config::InputOptions *o)
-{
- options = o;
add("android_application", &Loader::component<AndroidApplicationComponent>);
add("build_info", &Loader::build_info);
add("datapack", &Loader::component<DataPackComponent>);
{
/* Make sure the source tarball is last in the list so targets from all
other components wil be created first */
- ComponentList::iterator i = find(obj.components, obj.source_archive);
+ auto i = find(obj.components, obj.source_archive);
if(i!=obj.components.end())
obj.components.splice(obj.components.end(), obj.components, i);
}
const Config::Option &opt = obj.config.add_option(feat);
if(options)
{
- Config::InputOptions::const_iterator i = options->find(opt.name);
+ auto i = options->find(opt.name);
if(i!=options->end())
obj.config.set_option(opt.name, i->second);
}