]> git.tdb.fi Git - builder.git/blobdiff - source/mingwdlltool.cpp
Convert all list containers to vectors
[builder.git] / source / mingwdlltool.cpp
index dc9022e12378c06b56016fbb00e12a0596beb3b1..922fe51a10b724c5daa0608e55e5efb90e2392fc 100644 (file)
@@ -21,13 +21,14 @@ MingwDllTool::MingwDllTool(Builder &b, const Architecture &a):
        set_command("dlltool", true);
 }
 
-Target *MingwDllTool::create_target(const list<Target *> &sources, const string &)
+Target *MingwDllTool::create_target(const vector<Target *> &sources, const string &)
 {
        if(sources.size()!=1)
                throw invalid_argument("MingwDllTool::create_target");
        SharedLibrary &shlib = dynamic_cast<SharedLibrary &>(*sources.front());
 
-       list<ObjectFile *> objs;
+       vector<ObjectFile *> objs;
+       objs.reserve(shlib.get_dependencies().size());
        for(Target *d: shlib.get_dependencies())
                if(ObjectFile *obj = dynamic_cast<ObjectFile *>(d))
                        objs.push_back(obj);