Commit 75601b81 authored by cubeleo's avatar cubeleo Committed by Wouter van Oortmerssen

Correctly generate identifier for enums. (#4871)

This should allow the EnumName* function to work with enums generated
using the --scoped-enum flag.
parent e203882d
......@@ -991,7 +991,7 @@ class CppGenerator : public BaseGenerator {
for (auto it = enum_def.vals.vec.begin(); it != enum_def.vals.vec.end();
++it) {
const auto &ev = **it;
code_ += " case {{ENUM_NAME}}_" + Name(ev) + ": return \"" +
code_ += " case " + GetEnumValUse(enum_def, ev) + ": return \"" +
Name(ev) + "\";";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment