diff options
author | randomdan <randomdan@localhost> | 2011-02-03 19:04:57 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2011-02-03 19:04:57 +0000 |
commit | 0aabf9e2e3c325d21fcae9b6841563cedc0c16a1 (patch) | |
tree | 92ca0c5ff34cf531ffbe01c02fc20c352d0b55f7 | |
parent | Add missing conversion in generic visitor (diff) | |
download | project2-0aabf9e2e3c325d21fcae9b6841563cedc0c16a1.tar.bz2 project2-0aabf9e2e3c325d21fcae9b6841563cedc0c16a1.tar.xz project2-0aabf9e2e3c325d21fcae9b6841563cedc0c16a1.zip |
Don't construct the dir end iterator every iteration
-rw-r--r-- | project2/fsRows.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/project2/fsRows.cpp b/project2/fsRows.cpp index 486dc90..b55e058 100644 --- a/project2/fsRows.cpp +++ b/project2/fsRows.cpp @@ -177,7 +177,8 @@ FsRows::execute(const Path & dir, const RowProcessor * rp) const { depth += 1; try { - for (DirEnt itr(dir); itr != DirEnt(); ++itr) { + DirEnt end; + for (DirEnt itr(dir); itr != end; ++itr) { curPathStr = itr->path().string(); curPath = itr->path(); stat(curPathStr.c_str(), &curStat); |