1
1
forked from 0ad/0ad

Removes unused wutil_SystemPath forgotten in 9aad0137ba.

This was SVN commit r27748.
This commit is contained in:
Vladislav Belov 2023-07-02 21:19:07 +00:00
parent a71a20cb60
commit 0caddf2c89
2 changed files with 0 additions and 19 deletions

View File

@ -162,17 +162,11 @@ Status StatusFromWin()
// directories
// (NB: wutil_Init is called before static ctors => use placement new)
static OsPath* systemPath;
static OsPath* executablePath;
static OsPath* localAppdataPath;
static OsPath* roamingAppdataPath;
static OsPath* personalPath;
const OsPath& wutil_SystemPath()
{
return *systemPath;
}
const OsPath& wutil_ExecutablePath()
{
return *executablePath;
@ -214,16 +208,6 @@ static void GetDirectories()
{
WinScopedPreserveLastError s;
// system directory
{
const UINT length = GetSystemDirectoryW(0, 0);
ENSURE(length != 0);
std::wstring path(length, '\0');
const UINT charsWritten = GetSystemDirectoryW(&path[0], length);
ENSURE(charsWritten == length-1);
systemPath = new(wutil_Allocate(sizeof(OsPath))) OsPath(path);
}
// executable's directory
executablePath = new(wutil_Allocate(sizeof(OsPath))) OsPath(sys_ExecutablePathname().Parent());
@ -240,8 +224,6 @@ static void GetDirectories()
static void FreeDirectories()
{
systemPath->~OsPath();
wutil_Free(systemPath);
executablePath->~OsPath();
wutil_Free(executablePath);
localAppdataPath->~OsPath();

View File

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