mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-14 13:22:49 +00:00
yuzu/wait_tree: Pass QString by value and std::move in the initializer list for WaitTreeText
Just a trivial modernization that potentially avoids copying strings in certain scenarios.
This commit is contained in:
parent
db3200b515
commit
17b4355391
|
@ -75,7 +75,7 @@ std::vector<std::unique_ptr<WaitTreeThread>> WaitTreeItem::MakeThreadItemList()
|
||||||
return item_list;
|
return item_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
WaitTreeText::WaitTreeText(const QString& t) : text(t) {}
|
WaitTreeText::WaitTreeText(QString t) : text(std::move(t)) {}
|
||||||
WaitTreeText::~WaitTreeText() = default;
|
WaitTreeText::~WaitTreeText() = default;
|
||||||
|
|
||||||
QString WaitTreeText::GetText() const {
|
QString WaitTreeText::GetText() const {
|
||||||
|
|
|
@ -52,7 +52,7 @@ private:
|
||||||
class WaitTreeText : public WaitTreeItem {
|
class WaitTreeText : public WaitTreeItem {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit WaitTreeText(const QString& text);
|
explicit WaitTreeText(QString text);
|
||||||
~WaitTreeText() override;
|
~WaitTreeText() override;
|
||||||
|
|
||||||
QString GetText() const override;
|
QString GetText() const override;
|
||||||
|
|
Loading…
Reference in a new issue