summaryrefslogtreecommitdiff
path: root/Source/Core/Common/FileUtil.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-07-31 22:18:45 -0400
committerLioncash <mathew1800@gmail.com>2014-07-31 22:18:45 -0400
commit1dc529462908f46e1abfbd1faa33d58aa7fe874e (patch)
treeafff6e9d13adca9fd73bd0078e2f555cc7265e96 /Source/Core/Common/FileUtil.cpp
parent5516b0382c231f493a3a99cd6ee17e29e6ba13e9 (diff)
Common: Simplify StripTailDirSlashes
Diffstat (limited to 'Source/Core/Common/FileUtil.cpp')
-rw-r--r--Source/Core/Common/FileUtil.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/Core/Common/FileUtil.cpp b/Source/Core/Common/FileUtil.cpp
index c06f4601a9..e84bc6c50b 100644
--- a/Source/Core/Common/FileUtil.cpp
+++ b/Source/Core/Common/FileUtil.cpp
@@ -59,11 +59,9 @@ static void StripTailDirSlashes(std::string &fname)
{
if (fname.length() > 1)
{
- size_t i = fname.length() - 1;
- while (fname[i] == DIR_SEP_CHR)
- fname[i--] = '\0';
+ while (fname.back() == DIR_SEP_CHR)
+ fname.pop_back();
}
- return;
}
// Returns true if file filename exists