X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdatapackcomponent.cpp;h=5750287fefe39a3b024f6cbf8630fa271faf8db6;hb=aa053d637e8259755af7d2e4b510a242f4d29c7b;hp=f936e9151e52c4cf501fb70dd1b5b162bcd5eb27;hpb=35f2979869bff43706f3163ec0979c7084aaa3c4;p=builder.git diff --git a/source/datapackcomponent.cpp b/source/datapackcomponent.cpp index f936e91..5750287 100644 --- a/source/datapackcomponent.cpp +++ b/source/datapackcomponent.cpp @@ -1,7 +1,7 @@ #include #include "builder.h" #include "datapackcomponent.h" -#include "file.h" +#include "datasourcefile.h" #include "sourcepackage.h" #include "tool.h" @@ -17,20 +17,19 @@ void DataPackComponent::create_targets() const Builder &builder = package.get_builder(); Tool &dcomp = builder.get_toolchain().get_tool("DATA"); - list files; - SourceList source_filenames = collect_source_files(); - for(SourceList::const_iterator i=source_filenames.begin(); i!=source_filenames.end(); ++i) + vector files; + for(const FS::Path &s: collect_source_files()) { - string ext = FS::extpart(FS::basename(*i)); + string ext = FS::extpart(FS::basename(s)); if(ext==".mdt") { - Target *src = dcomp.create_source(*this, *i); + Target *src = dcomp.create_source(*this, s); files.push_back(dcomp.create_target(*src, "collection")); } - else if(Target *tgt = builder.get_vfs().get_target(*i)) + else if(Target *tgt = builder.get_vfs().get_target(s)) files.push_back(tgt); else - files.push_back(new File(builder, package, *i)); + files.push_back(new DataSourceFile(builder, *this, s)); } Target *result = dcomp.create_target(files, "pack");