diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2018-07-16 16:41:38 -0700 |
---|---|---|
committer | Wouter van Oortmerssen <aardappel@gmail.com> | 2018-07-16 16:42:10 -0700 |
commit | 79f2adc50a23949d14b0da7d12a5d1451748e82c (patch) | |
tree | a35a24f07f7f934d05aed6fd2089b4a844133ba1 /src/reflection.cpp | |
parent | dcfe38c58f5be4e0896771dc971fb4b197892709 (diff) | |
download | flatbuffers-79f2adc50a23949d14b0da7d12a5d1451748e82c.tar.gz flatbuffers-79f2adc50a23949d14b0da7d12a5d1451748e82c.tar.bz2 flatbuffers-79f2adc50a23949d14b0da7d12a5d1451748e82c.zip |
Renamed Verifier methods
The name Verify was getting too overloaded, and confused
the VS compiler
Change-Id: I26423a4d513e4def2f4e41d7f278bb683fc12518
Diffstat (limited to 'src/reflection.cpp')
-rw-r--r-- | src/reflection.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/reflection.cpp b/src/reflection.cpp index a5147f0e..61c1ba73 100644 --- a/src/reflection.cpp +++ b/src/reflection.cpp @@ -507,7 +507,7 @@ bool VerifyVectorOfStructs(flatbuffers::Verifier &v, auto p = parent_table.GetPointer<const uint8_t *>(field_offset); if (required && !p) { return false; } - return !p || v.VerifyVector(p, obj.bytesize()); + return !p || v.VerifyVectorOrString(p, obj.bytesize()); } // forward declare to resolve cyclic deps between VerifyObject and VerifyVector @@ -524,29 +524,29 @@ bool VerifyVector(flatbuffers::Verifier &v, const reflection::Schema &schema, switch (vec_field.type()->element()) { case reflection::None: FLATBUFFERS_ASSERT(false); break; case reflection::UType: - return v.Verify(flatbuffers::GetFieldV<uint8_t>(table, vec_field)); + return v.VerifyVector(flatbuffers::GetFieldV<uint8_t>(table, vec_field)); case reflection::Bool: case reflection::Byte: case reflection::UByte: - return v.Verify(flatbuffers::GetFieldV<int8_t>(table, vec_field)); + return v.VerifyVector(flatbuffers::GetFieldV<int8_t>(table, vec_field)); case reflection::Short: case reflection::UShort: - return v.Verify(flatbuffers::GetFieldV<int16_t>(table, vec_field)); + return v.VerifyVector(flatbuffers::GetFieldV<int16_t>(table, vec_field)); case reflection::Int: case reflection::UInt: - return v.Verify(flatbuffers::GetFieldV<int32_t>(table, vec_field)); + return v.VerifyVector(flatbuffers::GetFieldV<int32_t>(table, vec_field)); case reflection::Long: case reflection::ULong: - return v.Verify(flatbuffers::GetFieldV<int64_t>(table, vec_field)); + return v.VerifyVector(flatbuffers::GetFieldV<int64_t>(table, vec_field)); case reflection::Float: - return v.Verify(flatbuffers::GetFieldV<float>(table, vec_field)); + return v.VerifyVector(flatbuffers::GetFieldV<float>(table, vec_field)); case reflection::Double: - return v.Verify(flatbuffers::GetFieldV<double>(table, vec_field)); + return v.VerifyVector(flatbuffers::GetFieldV<double>(table, vec_field)); case reflection::String: { - auto vecString = + auto vec_string = flatbuffers::GetFieldV<flatbuffers::Offset<flatbuffers::String>>( table, vec_field); - if (v.Verify(vecString) && v.VerifyVectorOfStrings(vecString)) { + if (v.VerifyVector(vec_string) && v.VerifyVectorOfStrings(vec_string)) { return true; } else { return false; @@ -564,7 +564,7 @@ bool VerifyVector(flatbuffers::Verifier &v, const reflection::Schema &schema, auto vec = flatbuffers::GetFieldV<flatbuffers::Offset<flatbuffers::Table>>( table, vec_field); - if (!v.Verify(vec)) return false; + if (!v.VerifyVector(vec)) return false; if (vec) { for (uoffset_t j = 0; j < vec->size(); j++) { if (!VerifyObject(v, schema, *obj, vec->Get(j), true)) { @@ -626,7 +626,7 @@ bool VerifyObject(flatbuffers::Verifier &v, const reflection::Schema &schema, break; case reflection::String: if (!table->VerifyField<uoffset_t>(v, field_def->offset()) || - !v.Verify(flatbuffers::GetFieldS(*table, *field_def))) { + !v.VerifyString(flatbuffers::GetFieldS(*table, *field_def))) { return false; } break; |