mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-08 21:17:53 +00:00
CSelectResourcePanel: Elide copies where applicable
We can just pass by const reference.
This commit is contained in:
@@ -79,12 +79,12 @@ void CSelectResourcePanel::FocusChanged(QWidget*, QWidget *pNew)
|
|||||||
deleteLater();
|
deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSelectResourcePanel::SearchStringChanged(QString SearchString)
|
void CSelectResourcePanel::SearchStringChanged(const QString& SearchString)
|
||||||
{
|
{
|
||||||
mProxyModel.SetSearchString(SearchString);
|
mProxyModel.SetSearchString(SearchString);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSelectResourcePanel::ResourceClicked(QModelIndex Index)
|
void CSelectResourcePanel::ResourceClicked(const QModelIndex& Index)
|
||||||
{
|
{
|
||||||
QModelIndex SourceIndex = mProxyModel.mapToSource(Index);
|
QModelIndex SourceIndex = mProxyModel.mapToSource(Index);
|
||||||
CResourceEntry *pEntry = mModel.EntryForIndex(SourceIndex);
|
CResourceEntry *pEntry = mModel.EntryForIndex(SourceIndex);
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ public:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void FocusChanged(QWidget *pOld, QWidget *pNew);
|
void FocusChanged(QWidget *pOld, QWidget *pNew);
|
||||||
void SearchStringChanged(QString SearchString);
|
void SearchStringChanged(const QString& SearchString);
|
||||||
void ResourceClicked(QModelIndex Index);
|
void ResourceClicked(const QModelIndex& Index);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // CSELECTRESOURCEPANEL_H
|
#endif // CSELECTRESOURCEPANEL_H
|
||||||
|
|||||||
Reference in New Issue
Block a user