mirror of https://github.com/AxioDL/metaforce.git
hecl/hecl: Remove pointer casts from GetTmpDir()
We can just make the pointers point to const data, eliminating the need to cast away const.
This commit is contained in:
parent
40b2e3edde
commit
e5a0d657b3
|
@ -690,16 +690,16 @@ int RecursiveMakeDir(const SystemChar* dir) {
|
|||
const SystemChar* GetTmpDir() {
|
||||
#ifdef _WIN32
|
||||
#if WINDOWS_STORE
|
||||
wchar_t* TMPDIR = nullptr;
|
||||
const wchar_t* TMPDIR = nullptr;
|
||||
#else
|
||||
wchar_t* TMPDIR = _wgetenv(L"TEMP");
|
||||
const wchar_t* TMPDIR = _wgetenv(L"TEMP");
|
||||
if (!TMPDIR)
|
||||
TMPDIR = (wchar_t*)L"\\Temp";
|
||||
TMPDIR = L"\\Temp";
|
||||
#endif
|
||||
#else
|
||||
char* TMPDIR = getenv("TMPDIR");
|
||||
const char* TMPDIR = getenv("TMPDIR");
|
||||
if (!TMPDIR)
|
||||
TMPDIR = (char*)"/tmp";
|
||||
TMPDIR = "/tmp";
|
||||
#endif
|
||||
return TMPDIR;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue