Part of #5265, neutral changes (#5281)

This commit is contained in:
Vladimir Glavnyy
2019-04-09 00:05:50 +07:00
committed by Wouter van Oortmerssen
parent dd85c3b721
commit dd6daa709b
15 changed files with 117 additions and 122 deletions

View File

@@ -109,9 +109,10 @@ namespace lua {
}
// A single enum member.
void EnumMember(const EnumVal ev, std::string *code_ptr) {
void EnumMember(const EnumDef &enum_def, const EnumVal &ev, std::string *code_ptr) {
std::string &code = *code_ptr;
code += std::string(Indent) + NormalizedName(ev) + " = " + NumToString(ev.value) + ",\n";
(void)enum_def;
}
// End enum code.
@@ -336,7 +337,7 @@ namespace lua {
}
code += EndFunc;
}
// Begin the creator function signature.
void BeginBuilderArgs(const StructDef &struct_def,
std::string *code_ptr) {
@@ -497,7 +498,7 @@ namespace lua {
GetMemberOfVectorOfStruct(struct_def, field, code_ptr);
}
else {
GetMemberOfVectorOfNonStruct(struct_def, field, code_ptr);
GetMemberOfVectorOfNonStruct(struct_def, field, code_ptr);
}
break;
}
@@ -572,11 +573,11 @@ namespace lua {
GenComment(enum_def.doc_comment, code_ptr, nullptr, Comment);
BeginEnum(NormalizedName(enum_def), code_ptr);
for (auto it = enum_def.vals.vec.begin(); it != enum_def.vals.vec.end();
++it) {
for (auto it = enum_def.Vals().begin(); it != enum_def.Vals().end();
++it) {
auto &ev = **it;
GenComment(ev.doc_comment, code_ptr, nullptr, Comment);
EnumMember(ev, code_ptr);
EnumMember(enum_def, ev, code_ptr);
}
EndEnum(code_ptr);
}