From fb384dec5501b22ac64b6770a0ae2970e24c8d27 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 26 Jul 2019 17:48:33 -0400 Subject: OGL/ProgramShaderCache: Use std::string_view where applicable --- Source/Core/VideoBackends/OGL/ProgramShaderCache.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/ProgramShaderCache.h') diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h index bc93445c55..72ec79b5ac 100644 --- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h +++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include "Common/GL/GLUtil.h" @@ -75,11 +75,11 @@ public: static void InvalidateVertexFormatIfBound(GLuint vao); static void InvalidateLastProgram(); - static bool CompileComputeShader(SHADER& shader, const std::string& code); - static GLuint CompileSingleShader(GLenum type, const std::string& code); - static bool CheckShaderCompileResult(GLuint id, GLenum type, const std::string& code); - static bool CheckProgramLinkResult(GLuint id, const std::string* vcode, const std::string* pcode, - const std::string* gcode); + static bool CompileComputeShader(SHADER& shader, std::string_view code); + static GLuint CompileSingleShader(GLenum type, std::string_view code); + static bool CheckShaderCompileResult(GLuint id, GLenum type, std::string_view code); + static bool CheckProgramLinkResult(GLuint id, std::string_view vcode, std::string_view pcode, + std::string_view gcode); static StreamBuffer* GetUniformBuffer(); static u32 GetUniformBufferAlignment(); static void UploadConstants(); -- cgit v1.2.3 From 67bd2de73eeef89628eb0ea26748e7a77591f83d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 26 Jul 2019 18:43:41 -0400 Subject: OGL/ProgramShaderCache: Convert typedef over to a using alias Same thing, but nicer to read from left to right. --- Source/Core/VideoBackends/OGL/ProgramShaderCache.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/ProgramShaderCache.h') diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h index 72ec79b5ac..3b09d99e53 100644 --- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h +++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h @@ -105,9 +105,9 @@ public: static void ReleasePipelineProgram(PipelineProgram* prog); private: - typedef std::unordered_map, - PipelineProgramKeyHash> - PipelineProgramMap; + using PipelineProgramMap = + std::unordered_map, + PipelineProgramKeyHash>; static void CreateAttributelessVAO(); -- cgit v1.2.3