mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Merge pull request #707 from lioncash/strip
Common: Simplify StripTailDirSlashes
This commit is contained in:
commit
4b32dcbc33
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user