]> git.tdb.fi Git - builder.git/blobdiff - source/component.cpp
Refactor logger to do message formatting internally
[builder.git] / source / component.cpp
index 6545b28b95c460ed9b1f34b8ca679cd8aa77e677..e3f80fbc95b9becfd93c89ec9968784783d90dbf 100644 (file)
@@ -94,14 +94,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 +113,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())