From 823750b5674f1629facbe98410bf02f96f985c64 Mon Sep 17 00:00:00 2001 From: Alan Kemp Date: Sun, 12 May 2019 00:44:05 +0100 Subject: [PATCH] Compare enum names rather than values to determine last element --- include/spirv/unified1/spirv.json | 2 +- tools/buildHeaders/header.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/spirv/unified1/spirv.json b/include/spirv/unified1/spirv.json index 9dbbd83..2d5f6fb 100644 --- a/include/spirv/unified1/spirv.json +++ b/include/spirv/unified1/spirv.json @@ -481,7 +481,7 @@ "AliasedPointerEXT": 5356, "CounterBuffer": 5634, "HlslCounterBufferGOOGLE": 5634, - "HlslSemanticGOOGLE": 5635 + "HlslSemanticGOOGLE": 5635, "UserSemantic": 5635 } }, diff --git a/tools/buildHeaders/header.cpp b/tools/buildHeaders/header.cpp index 68a2929..f579eaf 100644 --- a/tools/buildHeaders/header.cpp +++ b/tools/buildHeaders/header.cpp @@ -347,7 +347,7 @@ namespace { bool printMax = (style != enumMask && maxEnum.size() > 0); for (const auto& v : sorted) - out << enumFmt(opPrefix, v, style, !printMax && v.first == sorted.back().first); + out << enumFmt(opPrefix, v, style, !printMax && v.second == sorted.back().second); if (printMax) out << maxEnum; -- 2.7.4