From c4d27cc8ec2222ec7ad650b212a2c3b005f51f0f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 21 May 2018 12:07:46 -0400 Subject: [PATCH] PostProcessing: Make GetShader() return by constant reference We don't need to create copies of the shader string when they can be avoided. --- Source/Core/VideoCommon/PostProcessing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/PostProcessing.h b/Source/Core/VideoCommon/PostProcessing.h index fc60fb4676..e610b7fc38 100644 --- a/Source/Core/VideoCommon/PostProcessing.h +++ b/Source/Core/VideoCommon/PostProcessing.h @@ -57,7 +57,7 @@ public: std::string LoadShader(std::string shader = ""); void SaveOptionsConfiguration(); void ReloadShader(); - std::string GetShader() const { return m_current_shader; } + const std::string& GetShader() const { return m_current_shader; } bool IsDirty() const { return m_any_options_dirty; } void SetDirty(bool dirty) { m_any_options_dirty = dirty; } bool HasOptions() const { return m_options.size() > 0; }