From e60bed753fb99ee92a3c86288cf32b016a24f078 Mon Sep 17 00:00:00 2001 From: vladislavbelov Date: Sun, 2 Jul 2023 21:24:15 +0000 Subject: [PATCH] Removes redundant and unused wutil_ExecutablePath as we have sys_ExecutablePathname. Last usage was removed in ada16439ab. This was SVN commit r27749. --- source/lib/sysdep/os/win/wutil.cpp | 11 ----------- source/lib/sysdep/os/win/wutil.h | 1 - 2 files changed, 12 deletions(-) diff --git a/source/lib/sysdep/os/win/wutil.cpp b/source/lib/sysdep/os/win/wutil.cpp index 9f3188ab0b..505993b9d2 100644 --- a/source/lib/sysdep/os/win/wutil.cpp +++ b/source/lib/sysdep/os/win/wutil.cpp @@ -162,16 +162,10 @@ Status StatusFromWin() // directories // (NB: wutil_Init is called before static ctors => use placement new) -static OsPath* executablePath; static OsPath* localAppdataPath; static OsPath* roamingAppdataPath; static OsPath* personalPath; -const OsPath& wutil_ExecutablePath() -{ - return *executablePath; -} - const OsPath& wutil_LocalAppdataPath() { return *localAppdataPath; @@ -208,9 +202,6 @@ static void GetDirectories() { WinScopedPreserveLastError s; - // executable's directory - executablePath = new(wutil_Allocate(sizeof(OsPath))) OsPath(sys_ExecutablePathname().Parent()); - // roaming application data roamingAppdataPath = GetFolderPath(CSIDL_APPDATA); @@ -224,8 +215,6 @@ static void GetDirectories() static void FreeDirectories() { - executablePath->~OsPath(); - wutil_Free(executablePath); localAppdataPath->~OsPath(); wutil_Free(localAppdataPath); roamingAppdataPath->~OsPath(); diff --git a/source/lib/sysdep/os/win/wutil.h b/source/lib/sysdep/os/win/wutil.h index 385a0d4630..841b975f9a 100644 --- a/source/lib/sysdep/os/win/wutil.h +++ b/source/lib/sysdep/os/win/wutil.h @@ -156,7 +156,6 @@ extern Status StatusFromWin(); //----------------------------------------------------------------------------- // directories -extern const OsPath& wutil_ExecutablePath(); extern const OsPath& wutil_LocalAppdataPath(); extern const OsPath& wutil_RoamingAppdataPath(); extern const OsPath& wutil_PersonalPath();