- for(SourceList::const_iterator j=sources.begin(); j!=sources.end(); ++j)
- base = base.empty() ? *j : FS::common_ancestor(base, *j);
- const SourceList &use_sources = (*i)->get_sources();
- for(SourceList::const_iterator j=use_sources.begin(); j!=use_sources.end(); ++j)
- base = FS::common_ancestor(base, *j);
+ for(const FS::Path &s: sources)
+ base = base.empty() ? s : FS::common_ancestor(base, s);
+ for(const FS::Path &s: u->get_sources())
+ base = FS::common_ancestor(base, s);