From 1218981a2232403abea458bdf7c847b47349f09e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 25 Sep 2017 17:51:15 -0700 Subject: [PATCH] Cleanup. --- tools/shaderc/shaderc.h | 8 ++++---- tools/shaderc/shaderc_glsl.cpp | 4 ++-- tools/shaderc/shaderc_hlsl.cpp | 6 +++--- tools/shaderc/shaderc_spirv.cpp | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/shaderc/shaderc.h b/tools/shaderc/shaderc.h index f10fc9725..f829cae06 100644 --- a/tools/shaderc/shaderc.h +++ b/tools/shaderc/shaderc.h @@ -129,10 +129,10 @@ namespace bgfx int32_t writef(bx::WriterI* _writer, const char* _format, ...); void writeFile(const char* _filePath, const void* _data, int32_t _size); - bool compileGLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer); - bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer); - bool compilePSSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer); - bool compileSPIRVShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer); + bool compileGLSLShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer); + bool compileHLSLShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer); + bool compilePSSLShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer); + bool compileSPIRVShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer); } // namespace bgfx diff --git a/tools/shaderc/shaderc_glsl.cpp b/tools/shaderc/shaderc_glsl.cpp index ad6d31013..39ebe1e67 100644 --- a/tools/shaderc/shaderc_glsl.cpp +++ b/tools/shaderc/shaderc_glsl.cpp @@ -8,7 +8,7 @@ namespace bgfx { namespace glsl { - static bool compile(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) + static bool compile(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) { char ch = char(tolower(_cmdLine.findOption('\0', "type")[0]) ); const glslopt_shader_type type = ch == 'f' @@ -306,7 +306,7 @@ namespace bgfx { namespace glsl } // namespace glsl - bool compileGLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) + bool compileGLSLShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) { return glsl::compile(_cmdLine, _version, _code, _writer); } diff --git a/tools/shaderc/shaderc_hlsl.cpp b/tools/shaderc/shaderc_hlsl.cpp index 99b7009c6..123ed32f6 100644 --- a/tools/shaderc/shaderc_hlsl.cpp +++ b/tools/shaderc/shaderc_hlsl.cpp @@ -545,7 +545,7 @@ namespace bgfx { namespace hlsl return true; } - static bool compile(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer, bool _firstPass) + static bool compile(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer, bool _firstPass) { const char* profile = _cmdLine.findOption('p', "profile"); if (NULL == profile) @@ -806,7 +806,7 @@ namespace bgfx { namespace hlsl } // namespace hlsl - bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) + bool compileHLSLShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) { return hlsl::compile(_cmdLine, _version, _code, _writer, true); } @@ -817,7 +817,7 @@ namespace bgfx { namespace hlsl namespace bgfx { - bool compileHLSLShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) + bool compileHLSLShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) { BX_UNUSED(_cmdLine, _version, _code, _writer); fprintf(stderr, "HLSL compiler is not supported on this platform.\n"); diff --git a/tools/shaderc/shaderc_spirv.cpp b/tools/shaderc/shaderc_spirv.cpp index 79581a905..b4fef5b9f 100644 --- a/tools/shaderc/shaderc_spirv.cpp +++ b/tools/shaderc/shaderc_spirv.cpp @@ -545,7 +545,7 @@ namespace bgfx { namespace spirv // fprintf(stderr, "%s\n", _message); // } - static bool compile(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) + static bool compile(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) { BX_UNUSED(_cmdLine, _version, _code, _writer); @@ -767,7 +767,7 @@ namespace bgfx { namespace spirv } // namespace spirv - bool compileSPIRVShader(bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) + bool compileSPIRVShader(const bx::CommandLine& _cmdLine, uint32_t _version, const std::string& _code, bx::WriterI* _writer) { return spirv::compile(_cmdLine, _version, _code, _writer); }