Skip to content

Commit

Permalink
Merge pull request #707 from lioncash/strip
Browse files Browse the repository at this point in the history
Common: Simplify StripTailDirSlashes
  • Loading branch information
lioncash committed Aug 1, 2014
2 parents 0380bb6 + 1dc5294 commit 4b32dcb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Source/Core/Common/FileUtil.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 4b32dcb

Please sign in to comment.