string_view refactor

This commit is contained in:
Jack Andersen
2017-11-12 20:15:33 -10:00
parent e18c0a62de
commit 75830dc6dd
10 changed files with 36 additions and 39 deletions

View File

@@ -22,10 +22,10 @@
namespace amuse
{
DirectoryEnumerator::DirectoryEnumerator(const SystemChar* path, Mode mode, bool sizeSort, bool reverse, bool noHidden)
DirectoryEnumerator::DirectoryEnumerator(SystemStringView path, Mode mode, bool sizeSort, bool reverse, bool noHidden)
{
Sstat theStat;
if (Stat(path, &theStat) || !S_ISDIR(theStat.st_mode))
if (Stat(path.data(), &theStat) || !S_ISDIR(theStat.st_mode))
return;
#if _WIN32
@@ -160,7 +160,7 @@ DirectoryEnumerator::DirectoryEnumerator(const SystemChar* path, Mode mode, bool
#else
DIR* dir = opendir(path);
DIR* dir = opendir(path.data());
if (!dir)
return;
const dirent* d;