From 59211589b9999acd1f18460e39c13c3ddd683d55 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 31 Jan 2024 22:53:42 -0500 Subject: [PATCH] CustomPipeline: Make use of emplace_back() in GlobalConflicts() We can use the string_view arguments to directly construct strings inside of the global_result vector. --- .../GraphicsModSystem/Runtime/CustomPipeline.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp index 549088042f..178719ba2d 100644 --- a/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp +++ b/Source/Core/VideoCommon/GraphicsModSystem/Runtime/CustomPipeline.cpp @@ -101,7 +101,7 @@ std::vector GlobalConflicts(std::string_view source) { i++; } - global_result.push_back(std::string{parse_identifier()}); + global_result.emplace_back(parse_identifier()); parse_until_end_of_preprocessor(); } else @@ -121,11 +121,11 @@ std::vector GlobalConflicts(std::string_view source) // Since we handle equality, we can assume the identifier // before '(' is a function definition - global_result.push_back(std::string{last_identifier}); + global_result.emplace_back(last_identifier); } else if (source[i] == '=') { - global_result.push_back(std::string{last_identifier}); + global_result.emplace_back(last_identifier); i++; for (; i < source.size(); i++) {