diff options
| author | bunnei <bunneidev@gmail.com> | 2019-05-25 22:59:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-25 22:59:16 -0400 |
| commit | f97e206348aace87ceb37ee16abc39992c716375 (patch) | |
| tree | af610f7d8c718550aff7a2711e05de3d17007197 /src/yuzu_cmd/config.cpp | |
| parent | 91300bdfb2c243dddea4f23fab752d47c9ad66a3 (diff) | |
| parent | e7ab0e91278c80eee110edda0c737ea05a4f0704 (diff) | |
Merge pull request #2511 from lioncash/file-str
common/file_util: Minor cleanup
Diffstat (limited to 'src/yuzu_cmd/config.cpp')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index d0ae058fd..730956427 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -26,12 +26,12 @@ Config::Config() { Config::~Config() = default; bool Config::LoadINI(const std::string& default_contents, bool retry) { - const char* location = this->sdl2_config_loc.c_str(); + const std::string& location = this->sdl2_config_loc; if (sdl2_config->ParseError() < 0) { if (retry) { LOG_WARNING(Config, "Failed to load {}. Creating file from defaults...", location); FileUtil::CreateFullPath(location); - FileUtil::WriteStringToFile(true, default_contents, location); + FileUtil::WriteStringToFile(true, location, default_contents); sdl2_config = std::make_unique<INIReader>(location); // Reopen file return LoadINI(default_contents, false); |
