Compare enum names rather than values to determine last element

This commit is contained in:
Alan Kemp
2019-05-12 00:44:05 +01:00
parent 37604af897
commit d8cd2f0fc6
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -481,7 +481,7 @@
"AliasedPointerEXT": 5356,
"CounterBuffer": 5634,
"HlslCounterBufferGOOGLE": 5634,
"HlslSemanticGOOGLE": 5635
"HlslSemanticGOOGLE": 5635,
"UserSemantic": 5635
}
},
+1 -1
View File
@@ -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;