mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
GraphicsModListWidget: Pass optional by const reference
All we do is read from it, so we don't need to copy the string if we happen to have one.
This commit is contained in:
@ -185,7 +185,7 @@ void GraphicsModListWidget::ModItemChanged(QListWidgetItem* item)
|
||||
m_needs_save = true;
|
||||
}
|
||||
|
||||
void GraphicsModListWidget::OnModChanged(std::optional<std::string> absolute_path)
|
||||
void GraphicsModListWidget::OnModChanged(const std::optional<std::string>& absolute_path)
|
||||
{
|
||||
ClearLayoutRecursively(m_mod_meta_layout);
|
||||
|
||||
@ -198,7 +198,7 @@ void GraphicsModListWidget::OnModChanged(std::optional<std::string> absolute_pat
|
||||
return;
|
||||
}
|
||||
|
||||
GraphicsModConfig* mod = m_mod_group.GetMod(*absolute_path);
|
||||
const GraphicsModConfig* mod = m_mod_group.GetMod(*absolute_path);
|
||||
if (!mod)
|
||||
return;
|
||||
|
||||
|
@ -52,7 +52,7 @@ private:
|
||||
void ModSelectionChanged();
|
||||
void ModItemChanged(QListWidgetItem* item);
|
||||
|
||||
void OnModChanged(std::optional<std::string> absolute_path);
|
||||
void OnModChanged(const std::optional<std::string>& absolute_path);
|
||||
|
||||
void SaveModList();
|
||||
|
||||
|
Reference in New Issue
Block a user