summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2011-02-03 19:04:57 +0000
committerrandomdan <randomdan@localhost>2011-02-03 19:04:57 +0000
commitbb97c4d0d5d309ad0dd453cb30c9a3e1c2dce0f0 (patch)
tree92ca0c5ff34cf531ffbe01c02fc20c352d0b55f7
parentAdd missing conversion in generic visitor (diff)
downloadproject2-bb97c4d0d5d309ad0dd453cb30c9a3e1c2dce0f0.tar.bz2
project2-bb97c4d0d5d309ad0dd453cb30c9a3e1c2dce0f0.tar.xz
project2-bb97c4d0d5d309ad0dd453cb30c9a3e1c2dce0f0.zip
Don't construct the dir end iterator every iteration
-rw-r--r--project2/fsRows.cpp3
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);