diff options
| author | Connor McLaughlin <stenzek@gmail.com> | 2019-07-28 14:21:59 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-28 14:21:59 +1000 |
| commit | 5bad233b1a25f817effa008b27c7e70db144ba9d (patch) | |
| tree | 7681c108c0a3518c320e23b273e5b6834c13a703 /Source/Core/VideoBackends/OGL/ProgramShaderCache.h | |
| parent | a9e04e0a72e59ee0cb9e0daf017561b2fb4b93dc (diff) | |
| parent | 67bd2de73eeef89628eb0ea26748e7a77591f83d (diff) | |
Merge pull request #8265 from lioncash/view
OGL/ProgramShaderCache: Use std::string_view where applicable
Diffstat (limited to 'Source/Core/VideoBackends/OGL/ProgramShaderCache.h')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/ProgramShaderCache.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h index bc93445c55..3b09d99e53 100644 --- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.h +++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.h @@ -7,7 +7,7 @@ #include <atomic> #include <memory> #include <mutex> -#include <tuple> +#include <string_view> #include <unordered_map> #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(); @@ -105,9 +105,9 @@ public: static void ReleasePipelineProgram(PipelineProgram* prog); private: - typedef std::unordered_map<PipelineProgramKey, std::unique_ptr<PipelineProgram>, - PipelineProgramKeyHash> - PipelineProgramMap; + using PipelineProgramMap = + std::unordered_map<PipelineProgramKey, std::unique_ptr<PipelineProgram>, + PipelineProgramKeyHash>; static void CreateAttributelessVAO(); |
