X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcsourcefile.cpp;h=954fdba72927c8b4417d177094b2de849e3306c8;hb=3043044d8ef02ef77def454fdede87927f5aa1f8;hp=0034ebd0e564870c6ed101835f52cd130ef42506;hpb=cd993966c0729074329df1a59ad46c82c68c0928;p=builder.git diff --git a/source/csourcefile.cpp b/source/csourcefile.cpp index 0034ebd..954fdba 100644 --- a/source/csourcefile.cpp +++ b/source/csourcefile.cpp @@ -62,12 +62,9 @@ void CSourceFile::find_dependencies() Tool *compiler = builder.get_toolchain().get_tool_for_suffix(FS::extpart(FS::basename(path)), true); if(compiler) compiler->prepare(); - for(IncludeList::iterator i=includes.begin(); i!=includes.end(); ++i) - { - Target *hdr = builder.get_vfs().find_header(i->substr(1), compiler, ((*i)[0]=='"' ? local_incpath : incpath)); - if(hdr) + for(const string &i: includes) + if(Target *hdr = builder.get_vfs().find_header(i.substr(1), compiler, (i[0]=='"' ? local_incpath : incpath))) add_transitive_dependency(*hdr); - } } void CSourceFile::modified()