Skip to content

Commit 63d352b

Browse files
committed
Misc: Fix move of constant values
1 parent b6cd37c commit 63d352b

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/core/fullscreenui_settings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ void FullscreenUI::BeginEffectBinding(SettingsInterface* bsi, InputBindingInfo::
553553
{
554554
// vibration motors use a list to select
555555
const bool game_settings = IsEditingGameSettings(bsi);
556-
const InputManager::DeviceEffectList effects = InputManager::EnumerateDeviceEffects(type);
556+
InputManager::DeviceEffectList effects = InputManager::EnumerateDeviceEffects(type);
557557
if (effects.empty())
558558
{
559559
ShowToast(OSDMessageType::Info, {}, FSUI_STR("No devices with vibration motors were detected."));

src/core/system.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1835,9 +1835,10 @@ bool System::BootSystem(SystemBootParameters parameters, Error* error)
18351835
{
18361836
if ((!parameters.save_state.empty() || !exe_override.empty()) && Achievements::IsHardcoreModeActive())
18371837
{
1838-
Achievements::ConfirmHardcoreModeDisableAsync(parameters.save_state.empty() ?
1839-
TRANSLATE_SV("Achievements", "Resuming state") :
1840-
TRANSLATE_SV("Achievements", "Overriding executable"),
1838+
const std::string_view message = !parameters.save_state.empty() ?
1839+
TRANSLATE_SV("Achievements", "Resuming state") :
1840+
TRANSLATE_SV("Achievements", "Overriding executable");
1841+
Achievements::ConfirmHardcoreModeDisableAsync(message,
18411842
[parameters = std::move(parameters)](bool approved) mutable {
18421843
if (approved)
18431844
{
@@ -2331,7 +2332,7 @@ bool System::GetFramePresentationParameters(GPUBackendFramePresentationParameter
23312332

23322333
if (cap->GetVideoFPS() != s_state.video_frame_rate) [[unlikely]]
23332334
{
2334-
const std::string next_capture_path = cap->GetNextCapturePath();
2335+
std::string next_capture_path = cap->GetNextCapturePath();
23352336
const u32 video_width = cap->GetVideoWidth();
23362337
const u32 video_height = cap->GetVideoHeight();
23372338
INFO_LOG("Video frame rate changed, switching to new capture file {}", Path::GetFileName(next_capture_path));

src/duckstation-qt/graphicssettingswidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,7 @@ void GraphicsSettingsWidget::createAspectRatioSetting(QComboBox* const cb, QSpin
10501050
separator->setVisible(is_custom_ar);
10511051
denominator->setVisible(is_custom_ar);
10521052

1053-
const auto value_changed = [cb, numerator, separator, denominator, sif]() {
1053+
auto value_changed = [cb, numerator, separator, denominator, sif]() {
10541054
std::optional<DisplayAspectRatio> value_to_save;
10551055
const int index = cb->currentIndex();
10561056
bool is_custom = false;

src/util/input_manager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ static void UpdateContinuedVibration();
154154
static void InternalPauseVibration();
155155
static void InternalClearEffects();
156156
static void GenerateRelativeMouseEvents();
157-
static void ReloadDevices();
157+
[[maybe_unused]] static void ReloadDevices();
158158

159159
static bool DoEventHook(InputBindingKey key, float value);
160160
static bool PreprocessEvent(InputBindingKey key, float value, GenericInputBinding generic_key);

0 commit comments

Comments
 (0)