]> git.tdb.fi Git - builder.git/blobdiff - source/component.cpp
Use default member initializers and constructor delegation
[builder.git] / source / component.cpp
index 6545b28b95c460ed9b1f34b8ca679cd8aa77e677..0186f3e394c3debe464a1d888ad12594fb941f0b 100644 (file)
@@ -13,9 +13,7 @@ using namespace Msp;
 
 Component::Component(SourcePackage &p, const string &n):
        package(p),
-       name(n),
-       install(false),
-       deflt(true)
+       name(n)
 { }
 
 void Component::prepare()
@@ -94,14 +92,15 @@ BuildInfo Component::get_build_info_for_path(const FS::Path &path) const
        return binfo;
 }
 
-list<FS::Path> Component::collect_source_files() const
+vector<FS::Path> Component::collect_source_files() const
 {
-       list<FS::Path> files;
+       vector<FS::Path> files;
        for(const FS::Path &p: sources)
        {
                if(FS::is_dir(p))
                {
-                       list<FS::Path> dirs;
+                       vector<FS::Path> dirs;
+                       dirs.reserve(1+overlays.size());
                        dirs.push_back(p);
                        for(const string &o: overlays)
                        {
@@ -112,7 +111,7 @@ list<FS::Path> Component::collect_source_files() const
                        set<string> overlay_files;
                        for(auto j=dirs.begin(); j!=dirs.end(); ++j)
                        {
-                               package.get_builder().get_logger().log("files", format("Traversing %s", *j));
+                               package.get_builder().get_logger().log("files", "Traversing %s", *j);
                                for(const string &f: list_files(*j))
                                {
                                        if(j!=dirs.begin())