1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-26 04:32:35 +01:00

Use move semantics with several shared pointers in vfs_dialog, they need not be copied

This commit is contained in:
Silent 2019-07-21 09:44:03 +02:00 committed by Megamouse
parent 78ecacabcb
commit f5f0a5aa19
3 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@
inline std::string sstr(const QString& _in) { return _in.toStdString(); }
vfs_dialog::vfs_dialog(std::shared_ptr<gui_settings> guiSettings, std::shared_ptr<emu_settings> emuSettings, QWidget* parent)
: QDialog(parent), m_gui_settings(guiSettings), m_emu_settings(emuSettings)
: QDialog(parent), m_gui_settings(std::move(guiSettings)), m_emu_settings(std::move(emuSettings))
{
QTabWidget* tabs = new QTabWidget();
tabs->setUsesScrollButtons(false);

View File

@ -5,8 +5,8 @@
inline std::string sstr(const QString& _in) { return _in.toStdString(); }
vfs_dialog_tab::vfs_dialog_tab(const vfs_settings_info& settingsInfo, std::shared_ptr<gui_settings> guiSettings, std::shared_ptr<emu_settings> emuSettings, QWidget* parent)
: QWidget(parent), m_info(settingsInfo), m_gui_settings(guiSettings), m_emu_settings(emuSettings)
vfs_dialog_tab::vfs_dialog_tab(vfs_settings_info settingsInfo, std::shared_ptr<gui_settings> guiSettings, std::shared_ptr<emu_settings> emuSettings, QWidget* parent)
: QWidget(parent), m_info(std::move(settingsInfo)), m_gui_settings(std::move(guiSettings)), m_emu_settings(std::move(emuSettings))
{
m_dirList = new QListWidget(this);

View File

@ -23,7 +23,7 @@ class vfs_dialog_tab : public QWidget
Q_OBJECT
public:
explicit vfs_dialog_tab(const vfs_settings_info& info, std::shared_ptr<gui_settings> guiSettings, std::shared_ptr<emu_settings> emuSettings, QWidget* parent = nullptr);
explicit vfs_dialog_tab(vfs_settings_info info, std::shared_ptr<gui_settings> guiSettings, std::shared_ptr<emu_settings> emuSettings, QWidget* parent = nullptr);
void SetSettings();
void AddNewDirectory();