mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-30 23:13:31 +01:00
Use scoped instead of raw pointer
This commit is contained in:
parent
0c51cfa5f6
commit
faea63cb3c
@ -88,7 +88,7 @@ namespace VeraCrypt
|
|||||||
|
|
||||||
FilePath Application::GetConfigFilePath (const wxString &configFileName, bool createConfigDir)
|
FilePath Application::GetConfigFilePath (const wxString &configFileName, bool createConfigDir)
|
||||||
{
|
{
|
||||||
static const wxString *configDirC = NULL;
|
static wxScopedPtr<const wxString> configDirC;
|
||||||
static bool configDirExists = false;
|
static bool configDirExists = false;
|
||||||
|
|
||||||
if (!configDirExists)
|
if (!configDirExists)
|
||||||
@ -108,7 +108,7 @@ namespace VeraCrypt
|
|||||||
}
|
}
|
||||||
|
|
||||||
EnsureEndsWithPathSeparator(*configDir);
|
EnsureEndsWithPathSeparator(*configDir);
|
||||||
configDirC = configDir;
|
configDirC.reset(configDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (createConfigDir)
|
if (createConfigDir)
|
||||||
|
Loading…
Reference in New Issue
Block a user