diff options
| author | Martin Ridgers <[email protected]> | 2021-11-16 14:25:56 +0100 |
|---|---|---|
| committer | Martin Ridgers <[email protected]> | 2021-11-16 14:32:21 +0100 |
| commit | 7875efb57617dc7772da4dcad82b1fb6aacf648c (patch) | |
| tree | 0ab803e6fde2e093e495a91dd030ff2540a06823 /zencore | |
| parent | Renamed operator<<(bool) to AppendBool() to avoid subtle errors (diff) | |
| download | zen-7875efb57617dc7772da4dcad82b1fb6aacf648c.tar.xz zen-7875efb57617dc7772da4dcad82b1fb6aacf648c.zip | |
ToUtf8() -> PathToUtf8() as the latter is less ambiguous
Diffstat (limited to 'zencore')
| -rw-r--r-- | zencore/filesystem.cpp | 4 | ||||
| -rw-r--r-- | zencore/include/zencore/filesystem.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/zencore/filesystem.cpp b/zencore/filesystem.cpp index 3c5ab2026..52f02b56a 100644 --- a/zencore/filesystem.cpp +++ b/zencore/filesystem.cpp @@ -729,7 +729,7 @@ ScanFile(std::filesystem::path Path, const uint64_t ChunkSize, std::function<voi } std::string -ToUtf8(const std::filesystem::path& Path) +PathToUtf8(const std::filesystem::path& Path) { #if ZEN_PLATFORM_WINDOWS return WideToUtf8(Path.native().c_str()); @@ -946,7 +946,7 @@ TEST_CASE("filesystem") // GetExePath -- this is not a great test as it's so dependent on where the this code gets linked in path BinPath = GetRunningExecutablePath(); - const bool ExpectedExe = ToUtf8(BinPath.stem().native()).ends_with("-test"sv) || BinPath.stem() == "zenserver"; + const bool ExpectedExe = PathToUtf8(BinPath.stem().native()).ends_with("-test"sv) || BinPath.stem() == "zenserver"; CHECK(ExpectedExe); CHECK(is_regular_file(BinPath)); diff --git a/zencore/include/zencore/filesystem.h b/zencore/include/zencore/filesystem.h index ec857b33c..e47d53685 100644 --- a/zencore/include/zencore/filesystem.h +++ b/zencore/include/zencore/filesystem.h @@ -56,7 +56,7 @@ struct CopyFileOptions ZENCORE_API bool CopyFile(std::filesystem::path FromPath, std::filesystem::path ToPath, const CopyFileOptions& Options); ZENCORE_API bool SupportsBlockRefCounting(std::filesystem::path Path); -ZENCORE_API std::string ToUtf8(const std::filesystem::path& Path); +ZENCORE_API std::string PathToUtf8(const std::filesystem::path& Path); extern template class StringBuilderImpl<std::filesystem::path::value_type>; |