Misc: Fix move of constant values

This commit is contained in:
Stenzek
2025-12-20 16:18:32 +10:00
parent b6cd37c6a4
commit 63d352bb03
4 changed files with 8 additions and 7 deletions

View File

@@ -553,7 +553,7 @@ void FullscreenUI::BeginEffectBinding(SettingsInterface* bsi, InputBindingInfo::
{
// vibration motors use a list to select
const bool game_settings = IsEditingGameSettings(bsi);
const InputManager::DeviceEffectList effects = InputManager::EnumerateDeviceEffects(type);
InputManager::DeviceEffectList effects = InputManager::EnumerateDeviceEffects(type);
if (effects.empty())
{
ShowToast(OSDMessageType::Info, {}, FSUI_STR("No devices with vibration motors were detected."));

View File

@@ -1835,9 +1835,10 @@ bool System::BootSystem(SystemBootParameters parameters, Error* error)
{
if ((!parameters.save_state.empty() || !exe_override.empty()) && Achievements::IsHardcoreModeActive())
{
Achievements::ConfirmHardcoreModeDisableAsync(parameters.save_state.empty() ?
TRANSLATE_SV("Achievements", "Resuming state") :
TRANSLATE_SV("Achievements", "Overriding executable"),
const std::string_view message = !parameters.save_state.empty() ?
TRANSLATE_SV("Achievements", "Resuming state") :
TRANSLATE_SV("Achievements", "Overriding executable");
Achievements::ConfirmHardcoreModeDisableAsync(message,
[parameters = std::move(parameters)](bool approved) mutable {
if (approved)
{
@@ -2331,7 +2332,7 @@ bool System::GetFramePresentationParameters(GPUBackendFramePresentationParameter
if (cap->GetVideoFPS() != s_state.video_frame_rate) [[unlikely]]
{
const std::string next_capture_path = cap->GetNextCapturePath();
std::string next_capture_path = cap->GetNextCapturePath();
const u32 video_width = cap->GetVideoWidth();
const u32 video_height = cap->GetVideoHeight();
INFO_LOG("Video frame rate changed, switching to new capture file {}", Path::GetFileName(next_capture_path));

View File

@@ -1050,7 +1050,7 @@ void GraphicsSettingsWidget::createAspectRatioSetting(QComboBox* const cb, QSpin
separator->setVisible(is_custom_ar);
denominator->setVisible(is_custom_ar);
const auto value_changed = [cb, numerator, separator, denominator, sif]() {
auto value_changed = [cb, numerator, separator, denominator, sif]() {
std::optional<DisplayAspectRatio> value_to_save;
const int index = cb->currentIndex();
bool is_custom = false;

View File

@@ -154,7 +154,7 @@ static void UpdateContinuedVibration();
static void InternalPauseVibration();
static void InternalClearEffects();
static void GenerateRelativeMouseEvents();
static void ReloadDevices();
[[maybe_unused]] static void ReloadDevices();
static bool DoEventHook(InputBindingKey key, float value);
static bool PreprocessEvent(InputBindingKey key, float value, GenericInputBinding generic_key);