From aa9bb084d8dbd148fcc09aed5a27d98ef6bdfb55 Mon Sep 17 00:00:00 2001 From: Qudix <17361645+Qudix@users.noreply.github.com> Date: Wed, 11 Oct 2023 23:58:10 -0500 Subject: [PATCH] chore: make const --- CommonLibSF/include/RE/I/INISettingCollection.h | 4 ++-- CommonLibSF/include/RE/R/RegSettingCollection.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CommonLibSF/include/RE/I/INISettingCollection.h b/CommonLibSF/include/RE/I/INISettingCollection.h index 3751d7a8..c76efa25 100644 --- a/CommonLibSF/include/RE/I/INISettingCollection.h +++ b/CommonLibSF/include/RE/I/INISettingCollection.h @@ -33,7 +33,7 @@ namespace RE template T GetSetting(const std::string_view a_name, T a_fallback, const bool a_default = false) { - if (auto setting = GetSetting(a_name)) { + if (const auto setting = GetSetting(a_name)) { return setting->GetValue(a_fallback, a_default); } @@ -43,7 +43,7 @@ namespace RE template bool SetSetting(const std::string_view a_name, T a_value) { - if (auto setting = GetSetting(a_name)) { + if (const auto setting = GetSetting(a_name)) { return setting->SetValue(a_value); } diff --git a/CommonLibSF/include/RE/R/RegSettingCollection.h b/CommonLibSF/include/RE/R/RegSettingCollection.h index 9be86942..1809a114 100644 --- a/CommonLibSF/include/RE/R/RegSettingCollection.h +++ b/CommonLibSF/include/RE/R/RegSettingCollection.h @@ -33,7 +33,7 @@ namespace RE template T GetSetting(const std::string_view a_name, T a_fallback, const bool a_default = false) { - if (auto setting = GetSetting(a_name)) { + if (const auto setting = GetSetting(a_name)) { return setting->GetValue(a_fallback, a_default); } @@ -43,7 +43,7 @@ namespace RE template bool SetSetting(const std::string_view a_name, T a_value) { - if (auto setting = GetSetting(a_name)) { + if (const auto setting = GetSetting(a_name)) { return setting->SetValue(a_value); }