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()