]> git.tdb.fi Git - builder.git/blobdiff - source/component.cpp
Inline simple constructors
[builder.git] / source / component.cpp
index 6545b28b95c460ed9b1f34b8ca679cd8aa77e677..4fddcef79de59a9ca0ca6cf05e8a5b71ec565a79 100644 (file)
 using namespace std;
 using namespace Msp;
 
-Component::Component(SourcePackage &p, const string &n):
-       package(p),
-       name(n),
-       install(false),
-       deflt(true)
-{ }
-
 void Component::prepare()
 {
        for(Package *r: requires)
@@ -94,14 +87,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 +106,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())