]> git.tdb.fi Git - builder.git/blobdiff - source/virtualfilesystem.cpp
Remove most container typedefs and refactor others
[builder.git] / source / virtualfilesystem.cpp
index 0c3ee36ec830e09864ea6416b113109c15b5ff3f..783583f7798d2f9228b92a954bb93e387b7606cd 100644 (file)
@@ -30,7 +30,7 @@ FileTarget *VirtualFileSystem::get_target(const FS::Path &p) const
 
 void VirtualFileSystem::register_path(const FS::Path &path, FileTarget *t)
 {
-       targets.insert(TargetMap::value_type(path.str(), t));
+       targets.insert({ path, t });
        nonexistent.erase(path);
        builder.get_logger().log("vfs", format("Path %s registered to %s", path, t->get_name()));
 }
@@ -44,10 +44,10 @@ FileTarget *VirtualFileSystem::find_header(const string &name, Tool *tool, const
 
        tool->prepare();
 
-       list<FS::Path> combined_path(path.begin(), path.end());
+       SearchPath combined_path = path;
        if(use_syspath)
        {
-               const Tool::SearchPath &syspath = tool->get_system_path();
+               const SearchPath &syspath = tool->get_system_path();
                combined_path.insert(combined_path.end(), syspath.begin(), syspath.end());
        }
 
@@ -73,12 +73,12 @@ FileTarget *VirtualFileSystem::find_header(const string &name, Tool *tool, const
 
 FileTarget *VirtualFileSystem::find_library(const string &lib, const SearchPath &path, BuildInfo::LibraryMode mode, bool use_syspath)
 {
-       list<FS::Path> combined_path(path.begin(), path.end());
+       SearchPath combined_path = path;
        if(use_syspath)
        {
                Tool &linker = builder.get_toolchain().get_tool("LINK");
                linker.prepare();
-               const Tool::SearchPath &syspath = linker.get_system_path();
+               const SearchPath &syspath = linker.get_system_path();
                combined_path.insert(combined_path.end(), syspath.begin(), syspath.end());
        }