Skip to content

Commit

Permalink
gui2/twml_error: Use filesystem.cpp's is_path_sep() instead of our ow…
Browse files Browse the repository at this point in the history
…n thing
  • Loading branch information
irydacea committed Mar 1, 2014
1 parent 99b1a1f commit 5bc77e3
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/gui/dialogs/wml_error.cpp
Expand Up @@ -32,18 +32,10 @@

namespace
{
inline bool is_dir_separator(char c)
{
#ifdef _WIN32
return c == '/' || c == '\\';
#else
return c == '/';
#endif
}

void strip_trailing_dir_separators(std::string& str)
{
while(is_dir_separator(str[str.size() - 1])) {
while(is_path_sep(str[str.size() - 1])) {
str.erase(str.size() - 1);
}
}
Expand Down

0 comments on commit 5bc77e3

Please sign in to comment.