mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-27 08:45:00 +01:00
Extract ShouldIgnoreCase to Platform
This commit is contained in:
@@ -212,11 +212,7 @@ namespace Path
|
||||
|
||||
bool Equals(const utf8* a, const utf8* b)
|
||||
{
|
||||
bool ignoreCase = false;
|
||||
#ifdef _WIN32
|
||||
ignoreCase = true;
|
||||
#endif
|
||||
return String::Equals(a, b, ignoreCase);
|
||||
return String::Equals(a, b, Platform::ShouldIgnoreCase());
|
||||
}
|
||||
|
||||
std::string ResolveCasing(const std::string& path)
|
||||
|
||||
@@ -175,6 +175,11 @@ namespace Platform
|
||||
return lastModified;
|
||||
}
|
||||
|
||||
bool ShouldIgnoreCase()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IsPathSeparator(char c)
|
||||
{
|
||||
return c == '/';
|
||||
|
||||
@@ -554,6 +554,11 @@ namespace Platform
|
||||
return lastModified;
|
||||
}
|
||||
|
||||
bool ShouldIgnoreCase()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IsPathSeparator(char c)
|
||||
{
|
||||
return c == '\\' || c == '/';
|
||||
|
||||
@@ -34,6 +34,7 @@ namespace Platform
|
||||
std::string GetDocsPath();
|
||||
std::string GetCurrentExecutablePath();
|
||||
std::string GetCurrentExecutableDirectory();
|
||||
bool ShouldIgnoreCase();
|
||||
bool FileExists(const std::string path);
|
||||
bool IsPathSeparator(char c);
|
||||
utf8* GetAbsolutePath(utf8* buffer, size_t bufferSize, const utf8* relativePath);
|
||||
|
||||
Reference in New Issue
Block a user