From 0aabf9e2e3c325d21fcae9b6841563cedc0c16a1 Mon Sep 17 00:00:00 2001 From: randomdan Date: Thu, 3 Feb 2011 19:04:57 +0000 Subject: Don't construct the dir end iterator every iteration --- project2/fsRows.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3