X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=tool%2Fcompiler.cpp;h=b7f310c9c556d0deb3b0dac2b803049fa7868875;hb=refs%2Fheads%2Fwip;hp=49dd19031cc0408fc958e84afd3fcfa4063bc403;hpb=34213c1b452d87fcf1649bf42179a218361b5818;p=libs%2Fdatafile.git diff --git a/tool/compiler.cpp b/tool/compiler.cpp index 49dd190..b7f310c 100644 --- a/tool/compiler.cpp +++ b/tool/compiler.cpp @@ -166,16 +166,15 @@ ForEach::ForEach(Compiler &c, const FS::Path &b, const list &p): void ForEach::finish() { - list files = FS::list_files(base); - for(list::iterator i = files.begin(); i!=files.end(); ++i) + for(const string &f: FS::list_files(base)) { bool match = false; for(list::const_iterator j = patterns.begin(); (j!=patterns.end() && !match); ++j) - match = Regex(*j).match(*i); + match = static_cast(Regex(*j).match(f)); for(list::const_iterator j = excludes.begin(); (j!=excludes.end() && match); ++j) - match = !Regex(*j).match(*i); + match = !Regex(*j).match(f); if(match) - compiler.process_file(base / *i, write_st); + compiler.process_file(base/f, write_st); } }