mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +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
							
								
									d2003dae4a
								
							
						
					
					
						commit
						c2790a3f86
					
				
					 2 changed files with 5 additions and 2 deletions
				
			
		|  | @ -61,7 +61,8 @@ std::vector<std::unique_ptr<WaitTreeThread>> WaitTreeItem::MakeThreadItemList() | |||
|     return item_list; | ||||
| } | ||||
| 
 | ||||
| WaitTreeText::WaitTreeText(const QString& t) : text(t) {} | ||||
| WaitTreeText::WaitTreeText(QString t) : text(std::move(t)) {} | ||||
| WaitTreeText::~WaitTreeText() = default; | ||||
| 
 | ||||
| QString WaitTreeText::GetText() const { | ||||
|     return text; | ||||
|  |  | |||
|  | @ -50,7 +50,9 @@ private: | |||
| class WaitTreeText : public WaitTreeItem { | ||||
|     Q_OBJECT | ||||
| public: | ||||
|     explicit WaitTreeText(const QString& text); | ||||
|     explicit WaitTreeText(QString text); | ||||
|     ~WaitTreeText() override; | ||||
| 
 | ||||
|     QString GetText() const override; | ||||
| 
 | ||||
| private: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue