Merge pull request #13164 from jordan-woyak/saveable-deduction

Config/IsSettingSaveable: Use class template argument deduction.
This commit is contained in:
Admiral H. Curtiss 2024-11-04 11:05:28 +01:00 committed by GitHub
commit 59530966f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 7 deletions

View File

@ -6,19 +6,14 @@
#include <algorithm> #include <algorithm>
#include <array> #include <array>
#include "Common/Config/Config.h"
#include "Core/Config/AchievementSettings.h"
#include "Core/Config/GraphicsSettings.h"
#include "Core/Config/MainSettings.h"
#include "Core/Config/UISettings.h"
#include "Core/Config/WiimoteSettings.h" #include "Core/Config/WiimoteSettings.h"
namespace ConfigLoaders namespace ConfigLoaders
{ {
bool IsSettingSaveable(const Config::Location& config_location) bool IsSettingSaveable(const Config::Location& config_location)
{ {
static constexpr std::array<Config::System, 3> systems_not_saveable = { static constexpr std::array systems_not_saveable = {Config::System::GCPad, Config::System::WiiPad,
Config::System::GCPad, Config::System::WiiPad, Config::System::GCKeyboard}; Config::System::GCKeyboard};
if (std::find(begin(systems_not_saveable), end(systems_not_saveable), config_location.system) == if (std::find(begin(systems_not_saveable), end(systems_not_saveable), config_location.system) ==
end(systems_not_saveable)) end(systems_not_saveable))