Fix of namespace problem described in #4747 (#4752)

This commit is contained in:
Vitaly Bondar
2018-05-18 22:21:08 +03:00
committed by Wouter van Oortmerssen
parent 88912640d0
commit 8e42f44807

View File

@@ -2047,7 +2047,7 @@ class CppGenerator : public BaseGenerator {
auto cpp_type = field.attributes.Lookup("cpp_type");
std::string indexing;
if (field.value.type.enum_def) {
indexing += "(" + field.value.type.enum_def->name + ")";
indexing += "(" + WrapInNameSpace(*field.value.type.enum_def) + ")";
}
indexing += "_e->Get(_i)";
if (field.value.type.element == BASE_TYPE_BOOL) { indexing += " != 0"; }