refactor: replace POSIX/Win32 APIs with standard C++ equivalents

Replaces platform-specific APIs across 21 files with std::chrono, std::fstream, std::filesystem, and std::this_thread. Adds PlatformTime.h utility header wrapping std::chrono::steady_clock for GetTickCount/QueryPerformanceCounter patterns.
This commit is contained in:
MatthewBeshay
2026-04-01 05:01:37 +11:00
parent 2f92b07c1f
commit ee31bfcec5
21 changed files with 196 additions and 306 deletions

View File

@@ -85,11 +85,11 @@ File::File(const std::wstring& pathname) {
for (const char* base : bases) {
std::string tryFull = exeDir + base + request;
std::string tryFile = exeDir + base + fileName;
if (access(tryFull.c_str(), F_OK) != -1) {
if (std::filesystem::exists(tryFull)) {
m_abstractPathName = convStringToWstring(tryFull);
return;
}
if (access(tryFile.c_str(), F_OK) != -1) {
if (std::filesystem::exists(tryFile)) {
m_abstractPathName = convStringToWstring(tryFile);
return;
}