1
0
forked from 0ad/0ad

Removes redundant and unused wutil_ExecutablePath as we have sys_ExecutablePathname.

Last usage was removed in ada16439ab.

This was SVN commit r27749.
This commit is contained in:
Vladislav Belov 2023-07-02 21:24:15 +00:00
parent 0caddf2c89
commit e60bed753f
2 changed files with 0 additions and 12 deletions

View File

@ -162,16 +162,10 @@ Status StatusFromWin()
// directories // directories
// (NB: wutil_Init is called before static ctors => use placement new) // (NB: wutil_Init is called before static ctors => use placement new)
static OsPath* executablePath;
static OsPath* localAppdataPath; static OsPath* localAppdataPath;
static OsPath* roamingAppdataPath; static OsPath* roamingAppdataPath;
static OsPath* personalPath; static OsPath* personalPath;
const OsPath& wutil_ExecutablePath()
{
return *executablePath;
}
const OsPath& wutil_LocalAppdataPath() const OsPath& wutil_LocalAppdataPath()
{ {
return *localAppdataPath; return *localAppdataPath;
@ -208,9 +202,6 @@ static void GetDirectories()
{ {
WinScopedPreserveLastError s; WinScopedPreserveLastError s;
// executable's directory
executablePath = new(wutil_Allocate(sizeof(OsPath))) OsPath(sys_ExecutablePathname().Parent());
// roaming application data // roaming application data
roamingAppdataPath = GetFolderPath(CSIDL_APPDATA); roamingAppdataPath = GetFolderPath(CSIDL_APPDATA);
@ -224,8 +215,6 @@ static void GetDirectories()
static void FreeDirectories() static void FreeDirectories()
{ {
executablePath->~OsPath();
wutil_Free(executablePath);
localAppdataPath->~OsPath(); localAppdataPath->~OsPath();
wutil_Free(localAppdataPath); wutil_Free(localAppdataPath);
roamingAppdataPath->~OsPath(); roamingAppdataPath->~OsPath();

View File

@ -156,7 +156,6 @@ extern Status StatusFromWin();
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// directories // directories
extern const OsPath& wutil_ExecutablePath();
extern const OsPath& wutil_LocalAppdataPath(); extern const OsPath& wutil_LocalAppdataPath();
extern const OsPath& wutil_RoamingAppdataPath(); extern const OsPath& wutil_RoamingAppdataPath();
extern const OsPath& wutil_PersonalPath(); extern const OsPath& wutil_PersonalPath();