From cfd25f1d7cff062a3bd7f5649c2abcc2a44f2a8d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 8 Jun 2023 11:53:01 -0400 Subject: CodeDiffDialog: Construct Diff instance in CalculateSymbolsFromProfile() when necessary We can move the construction of the Diff instance into the body of the if statement, so that we only construct this if the condition is true. While we're at it, we can move the symbol description string into the instance, getting rid of a copy. The function itself can also be const qualified. --- Source/Core/DolphinQt/Debugger/CodeDiffDialog.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Core/DolphinQt/Debugger/CodeDiffDialog.h') diff --git a/Source/Core/DolphinQt/Debugger/CodeDiffDialog.h b/Source/Core/DolphinQt/Debugger/CodeDiffDialog.h index ac156dea91..3278359afe 100644 --- a/Source/Core/DolphinQt/Debugger/CodeDiffDialog.h +++ b/Source/Core/DolphinQt/Debugger/CodeDiffDialog.h @@ -38,7 +38,7 @@ private: void ClearBlockCache(); void OnClickItem(); void OnRecord(bool enabled); - std::vector CalculateSymbolsFromProfile(); + std::vector CalculateSymbolsFromProfile() const; void OnInclude(); void OnExclude(); void RemoveMissingSymbolsFromIncludes(const std::vector& symbol_diff); -- cgit v1.2.3