From 304735fb5236eea7b5f2594058a4de99ab26ec4a Mon Sep 17 00:00:00 2001 From: Subv Date: Sun, 21 Dec 2014 18:02:27 -0500 Subject: CFG: More style changes --- src/core/hle/service/cfg/cfg.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/hle/service/cfg') diff --git a/src/core/hle/service/cfg/cfg.cpp b/src/core/hle/service/cfg/cfg.cpp index 034a2c0d..abc2480f 100644 --- a/src/core/hle/service/cfg/cfg.cpp +++ b/src/core/hle/service/cfg/cfg.cpp @@ -2,6 +2,7 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. +#include #include "common/log.h" #include "common/make_unique.h" #include "core/file_sys/archive_systemsavedata.h" @@ -33,8 +34,8 @@ const std::array STEREO_CAMERA_SETTINGS = { 10.0f, 5.0f, 55.58000183105469f, 21.56999969482422f }; -const u32 CONFIG_SAVEFILE_SIZE = 0x8000; -std::array cfg_config_file_buffer = {}; +static const u32 CONFIG_SAVEFILE_SIZE = 0x8000; +static std::array cfg_config_file_buffer; static std::unique_ptr cfg_system_save_data; @@ -118,7 +119,7 @@ ResultCode FormatConfig() { if (!res.IsSuccess()) return res; // Delete the old data - std::fill(cfg_config_file_buffer.begin(), cfg_config_file_buffer.end(), 0); + cfg_config_file_buffer.fill(0); // Create the header SaveFileConfig* config = reinterpret_cast(cfg_config_file_buffer.data()); // This value is hardcoded, taken from 3dbrew, verified by hardware, it's always the same value @@ -160,9 +161,8 @@ ResultCode FormatConfig() { void CFGInit() { // TODO(Subv): In the future we should use the FS service to query this archive, // currently it is not possible because you can only have one open archive of the same type at any time - using Common::make_unique; std::string syssavedata_directory = FileUtil::GetUserPath(D_SYSSAVEDATA_IDX); - cfg_system_save_data = make_unique( + cfg_system_save_data = Common::make_unique( syssavedata_directory, CFG_SAVE_ID); if (!cfg_system_save_data->Initialize()) { LOG_CRITICAL(Service_CFG, "Could not initialize SystemSaveData archive for the CFG:U service"); -- cgit v1.2.3