X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmsvcarchiver.cpp;h=a724eb16577ae0eb9638a9287b485073fa14a227;hb=eadb72197ef2fde2a44914067277054c59b67161;hp=1481184d52673adb19dae15e020b623410aa7b30;hpb=c0e0728ff439ddb364cee26f164e46705beac822;p=builder.git diff --git a/source/msvcarchiver.cpp b/source/msvcarchiver.cpp index 1481184..a724eb1 100644 --- a/source/msvcarchiver.cpp +++ b/source/msvcarchiver.cpp @@ -25,9 +25,9 @@ Target *MsvcArchiver::create_target(const list &sources, const string throw invalid_argument("MsvcArchiver::create_target"); list objs; - for(list::const_iterator i=sources.begin(); i!=sources.end(); ++i) + for(Target *s: sources) { - if(ObjectFile *obj = dynamic_cast(*i)) + if(ObjectFile *obj = dynamic_cast(s)) objs.push_back(obj); else throw invalid_argument("MsvcArchiver::create_target"); @@ -57,9 +57,8 @@ Task *MsvcArchiver::run(const Target &target) const argv.push_back("/OUT:"+relative(lib.get_path(), work_dir).str()); - const Target::Dependencies &deps = lib.get_dependencies(); - for(Target::Dependencies::const_iterator i=deps.begin(); i!=deps.end(); ++i) - if(ObjectFile *obj = dynamic_cast(*i)) + for(Target *d: lib.get_dependencies()) + if(ObjectFile *obj = dynamic_cast(d)) argv.push_back(relative(obj->get_path(), work_dir).str()); return new ExternalTask(argv, work_dir);