forked from BigfootDev/flatbuffers
Removed truncating of enum vals to int in ReverseLookup.
Some implementations (e.g. C++98) won't support 64-bit enum values, but there is no reason to silently truncate them. Change-Id: I8629563523a96e887068f9c0efcd53741f60e0d6 Tested: on Linux.
This commit is contained in:
@@ -317,7 +317,7 @@ struct EnumVal {
|
||||
struct EnumDef : public Definition {
|
||||
EnumDef() : is_union(false), uses_type_aliases(false) {}
|
||||
|
||||
EnumVal *ReverseLookup(int enum_idx, bool skip_union_default = true) {
|
||||
EnumVal *ReverseLookup(int64_t enum_idx, bool skip_union_default = true) {
|
||||
for (auto it = vals.vec.begin() +
|
||||
static_cast<int>(is_union && skip_union_default);
|
||||
it != vals.vec.end(); ++it) {
|
||||
|
||||
Reference in New Issue
Block a user