diff options
| author | 2016-04-05 13:29:55 +0100 | |
|---|---|---|
| committer | 2016-04-05 13:31:17 +0100 | |
| commit | a06dcfeb61d6769c562d6d50cfa3c0024176ae82 (patch) | |
| tree | e1f81e5faebce62810ac079b8a6e616182c34959 /src/citra | |
| parent | Merge pull request #1302 from Subv/save_fix (diff) | |
| download | yuzu-a06dcfeb61d6769c562d6d50cfa3c0024176ae82.tar.gz yuzu-a06dcfeb61d6769c562d6d50cfa3c0024176ae82.tar.xz yuzu-a06dcfeb61d6769c562d6d50cfa3c0024176ae82.zip | |
Common: Remove Common::make_unique, use std::make_unique
Diffstat (limited to 'src/citra')
| -rw-r--r-- | src/citra/citra.cpp | 4 | ||||
| -rw-r--r-- | src/citra/config.cpp | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/citra/citra.cpp b/src/citra/citra.cpp index 40e40f192..b12369136 100644 --- a/src/citra/citra.cpp +++ b/src/citra/citra.cpp | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <string> | 5 | #include <string> |
| 6 | #include <thread> | 6 | #include <thread> |
| 7 | #include <iostream> | 7 | #include <iostream> |
| 8 | #include <memory> | ||
| 8 | 9 | ||
| 9 | // This needs to be included before getopt.h because the latter #defines symbols used by it | 10 | // This needs to be included before getopt.h because the latter #defines symbols used by it |
| 10 | #include "common/microprofile.h" | 11 | #include "common/microprofile.h" |
| @@ -19,7 +20,6 @@ | |||
| 19 | #include "common/logging/log.h" | 20 | #include "common/logging/log.h" |
| 20 | #include "common/logging/backend.h" | 21 | #include "common/logging/backend.h" |
| 21 | #include "common/logging/filter.h" | 22 | #include "common/logging/filter.h" |
| 22 | #include "common/make_unique.h" | ||
| 23 | #include "common/scope_exit.h" | 23 | #include "common/scope_exit.h" |
| 24 | 24 | ||
| 25 | #include "core/settings.h" | 25 | #include "core/settings.h" |
| @@ -79,7 +79,7 @@ int main(int argc, char **argv) { | |||
| 79 | GDBStub::ToggleServer(Settings::values.use_gdbstub); | 79 | GDBStub::ToggleServer(Settings::values.use_gdbstub); |
| 80 | GDBStub::SetServerPort(static_cast<u32>(Settings::values.gdbstub_port)); | 80 | GDBStub::SetServerPort(static_cast<u32>(Settings::values.gdbstub_port)); |
| 81 | 81 | ||
| 82 | std::unique_ptr<EmuWindow_SDL2> emu_window = Common::make_unique<EmuWindow_SDL2>(); | 82 | std::unique_ptr<EmuWindow_SDL2> emu_window = std::make_unique<EmuWindow_SDL2>(); |
| 83 | 83 | ||
| 84 | VideoCore::g_hw_renderer_enabled = Settings::values.use_hw_renderer; | 84 | VideoCore::g_hw_renderer_enabled = Settings::values.use_hw_renderer; |
| 85 | VideoCore::g_shader_jit_enabled = Settings::values.use_shader_jit; | 85 | VideoCore::g_shader_jit_enabled = Settings::values.use_shader_jit; |
diff --git a/src/citra/config.cpp b/src/citra/config.cpp index 9034b188e..6b6617352 100644 --- a/src/citra/config.cpp +++ b/src/citra/config.cpp | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <memory> | ||
| 6 | |||
| 5 | #include <inih/cpp/INIReader.h> | 7 | #include <inih/cpp/INIReader.h> |
| 6 | 8 | ||
| 7 | #include <SDL.h> | 9 | #include <SDL.h> |
| @@ -10,7 +12,6 @@ | |||
| 10 | 12 | ||
| 11 | #include "common/file_util.h" | 13 | #include "common/file_util.h" |
| 12 | #include "common/logging/log.h" | 14 | #include "common/logging/log.h" |
| 13 | #include "common/make_unique.h" | ||
| 14 | 15 | ||
| 15 | #include "core/settings.h" | 16 | #include "core/settings.h" |
| 16 | 17 | ||
| @@ -19,7 +20,7 @@ | |||
| 19 | Config::Config() { | 20 | Config::Config() { |
| 20 | // TODO: Don't hardcode the path; let the frontend decide where to put the config files. | 21 | // TODO: Don't hardcode the path; let the frontend decide where to put the config files. |
| 21 | sdl2_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "sdl2-config.ini"; | 22 | sdl2_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "sdl2-config.ini"; |
| 22 | sdl2_config = Common::make_unique<INIReader>(sdl2_config_loc); | 23 | sdl2_config = std::make_unique<INIReader>(sdl2_config_loc); |
| 23 | 24 | ||
| 24 | Reload(); | 25 | Reload(); |
| 25 | } | 26 | } |
| @@ -31,7 +32,7 @@ bool Config::LoadINI(const std::string& default_contents, bool retry) { | |||
| 31 | LOG_WARNING(Config, "Failed to load %s. Creating file from defaults...", location); | 32 | LOG_WARNING(Config, "Failed to load %s. Creating file from defaults...", location); |
| 32 | FileUtil::CreateFullPath(location); | 33 | FileUtil::CreateFullPath(location); |
| 33 | FileUtil::WriteStringToFile(true, default_contents, location); | 34 | FileUtil::WriteStringToFile(true, default_contents, location); |
| 34 | sdl2_config = Common::make_unique<INIReader>(location); // Reopen file | 35 | sdl2_config = std::make_unique<INIReader>(location); // Reopen file |
| 35 | 36 | ||
| 36 | return LoadINI(default_contents, false); | 37 | return LoadINI(default_contents, false); |
| 37 | } | 38 | } |