diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp index 09566c906b74a7aeb534b509ed34f2b444eb4608..fcf356874ebe959e778f5c59ca0d95a11e241b46 100755 --- a/SPIRV/GlslangToSpv.cpp +++ b/SPIRV/GlslangToSpv.cpp @@ -5259,10 +5259,10 @@ void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, std::ofstream out; out.open(baseName, std::ios::binary | std::ios::out); out << "\t// " GLSLANG_REVISION " " GLSLANG_DATE << std::endl; - if (varName != nullptr) { - out << "\t #pragma once" << std::endl; - out << "const uint32_t " << varName << "[] = {" << std::endl; - } + if (varName != nullptr) { + out << "\t #pragma once" << std::endl; + out << "const uint32_t " << varName << "[] = {" << std::endl; + } const int WORDS_PER_LINE = 8; for (int i = 0; i < (int)spirv.size(); i += WORDS_PER_LINE) { out << "\t"; @@ -5275,9 +5275,9 @@ void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName, } out << std::endl; } - if (varName != nullptr) { - out << "};"; - } + if (varName != nullptr) { + out << "};"; + } out.close(); } diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp index fb37f8f2b705e488e2a33c9459950dde041f1e3b..26f4b6c7d9dfe4a18bedd7bd25d1721b552c758a 100644 --- a/StandAlone/StandAlone.cpp +++ b/StandAlone/StandAlone.cpp @@ -303,20 +303,18 @@ void ProcessArguments(int argc, char* argv[]) } else if (lowerword == "no-storage-format" || // synonyms lowerword == "nsf") { Options |= EOptionNoStorageFormat; - } - else if (lowerword == "variable-name" || // synonyms - lowerword == "vn") { - Options |= EOptionOutputHexadecimal; - variableName = argv[1]; - if (argc > 0) { - argc--; - argv++; - } - else - Error("no <C-variable-name> provided for --variable-name"); - break; - } - else if (lowerword == "source-entrypoint" || // synonyms + } else if (lowerword == "variable-name" || // synonyms + lowerword == "vn") { + Options |= EOptionOutputHexadecimal; + variableName = argv[1]; + if (argc > 0) { + argc--; + argv++; + } else + Error("no <C-variable-name> provided for --variable-name"); + break; + } + else if (lowerword == "source-entrypoint" || // synonyms lowerword == "sep") { sourceEntryPointName = argv[1]; if (argc > 0) {