Common: Simplify StripTailDirSlashes
This commit is contained in:
parent
5516b0382c
commit
1dc5294629
|
@ -59,11 +59,9 @@ static void StripTailDirSlashes(std::string &fname)
|
||||||
{
|
{
|
||||||
if (fname.length() > 1)
|
if (fname.length() > 1)
|
||||||
{
|
{
|
||||||
size_t i = fname.length() - 1;
|
while (fname.back() == DIR_SEP_CHR)
|
||||||
while (fname[i] == DIR_SEP_CHR)
|
fname.pop_back();
|
||||||
fname[i--] = '\0';
|
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns true if file filename exists
|
// Returns true if file filename exists
|
||||||
|
|
Loading…
Reference in New Issue