diff options
| author | 2018-12-05 15:59:48 -0500 | |
|---|---|---|
| committer | 2018-12-05 18:34:03 -0500 | |
| commit | 17b4355391f872f238a971fbece12ebd1b7773cb (patch) | |
| tree | 5c82db19f166610b008586be7e55718ead29505a /src | |
| parent | Merge pull request #1859 from heapo/lut_array_codegen (diff) | |
| download | yuzu-17b4355391f872f238a971fbece12ebd1b7773cb.tar.gz yuzu-17b4355391f872f238a971fbece12ebd1b7773cb.tar.xz yuzu-17b4355391f872f238a971fbece12ebd1b7773cb.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/debugger/wait_tree.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/debugger/wait_tree.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/yuzu/debugger/wait_tree.cpp b/src/yuzu/debugger/wait_tree.cpp index f9c18ede4..6b3a757e0 100644 --- a/src/yuzu/debugger/wait_tree.cpp +++ b/src/yuzu/debugger/wait_tree.cpp | |||
| @@ -75,7 +75,7 @@ std::vector<std::unique_ptr<WaitTreeThread>> WaitTreeItem::MakeThreadItemList() | |||
| 75 | return item_list; | 75 | return item_list; |
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | WaitTreeText::WaitTreeText(const QString& t) : text(t) {} | 78 | WaitTreeText::WaitTreeText(QString t) : text(std::move(t)) {} |
| 79 | WaitTreeText::~WaitTreeText() = default; | 79 | WaitTreeText::~WaitTreeText() = default; |
| 80 | 80 | ||
| 81 | QString WaitTreeText::GetText() const { | 81 | QString WaitTreeText::GetText() const { |
diff --git a/src/yuzu/debugger/wait_tree.h b/src/yuzu/debugger/wait_tree.h index 492fb6ac9..e639ef412 100644 --- a/src/yuzu/debugger/wait_tree.h +++ b/src/yuzu/debugger/wait_tree.h | |||
| @@ -52,7 +52,7 @@ private: | |||
| 52 | class WaitTreeText : public WaitTreeItem { | 52 | class WaitTreeText : public WaitTreeItem { |
| 53 | Q_OBJECT | 53 | Q_OBJECT |
| 54 | public: | 54 | public: |
| 55 | explicit WaitTreeText(const QString& text); | 55 | explicit WaitTreeText(QString text); |
| 56 | ~WaitTreeText() override; | 56 | ~WaitTreeText() override; |
| 57 | 57 | ||
| 58 | QString GetText() const override; | 58 | QString GetText() const override; |