mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-02 08:25:40 +02:00
Update flatbuffers to v22.9.29 (#26)
* update flatbuffers files How: - Copied files in from the latest release (v22.9.29) of flatbuffers Why: - The files in place blocked compilation within Alpine Linux Links: - https://github.com/felt/tippecanoe/issues/24 - https://github.com/google/flatbuffers/releases/tag/v22.9.29 * update flatgeobuf generate files How - Created `feature_generated.h` & `header_generated.h` using the `src/fbs` files from the latest release (3.23.1) of flatgeobuf - Downloaded the `flatc` binary from the v22.9.29 release of flatbuffers - Copied `flatc` into the flatgeobuf repository - Created a new directory named `out` to collect the generated files - `./flatc --cpp -o out -I include src/fbs/feature.fbs` - `./flatc --cpp -o out -I include src/fbs/header.fbs` - Moved the generate files from `out` into this repository's `flatgeobuf` directory Why - This is a required step in the process of updating flatbuffers files Links - https://github.com/flatgeobuf/flatgeobuf/releases/tag/3.23.1 - https://github.com/google/flatbuffers/releases/tag/v22.9.29 - https://github.com/felt/tippecanoe/issues/24#issuecomment-1286476550
This commit is contained in:
+7
-5
@@ -112,20 +112,22 @@ class Table {
|
||||
|
||||
// Verify a particular field.
|
||||
template<typename T>
|
||||
bool VerifyField(const Verifier &verifier, voffset_t field) const {
|
||||
bool VerifyField(const Verifier &verifier, voffset_t field,
|
||||
size_t align) const {
|
||||
// Calling GetOptionalFieldOffset should be safe now thanks to
|
||||
// VerifyTable().
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
// Check the actual field.
|
||||
return !field_offset || verifier.Verify<T>(data_, field_offset);
|
||||
return !field_offset || verifier.VerifyField<T>(data_, field_offset, align);
|
||||
}
|
||||
|
||||
// VerifyField for required fields.
|
||||
template<typename T>
|
||||
bool VerifyFieldRequired(const Verifier &verifier, voffset_t field) const {
|
||||
bool VerifyFieldRequired(const Verifier &verifier, voffset_t field,
|
||||
size_t align) const {
|
||||
auto field_offset = GetOptionalFieldOffset(field);
|
||||
return verifier.Check(field_offset != 0) &&
|
||||
verifier.Verify<T>(data_, field_offset);
|
||||
verifier.VerifyField<T>(data_, field_offset, align);
|
||||
}
|
||||
|
||||
// Versions for offsets.
|
||||
@@ -163,4 +165,4 @@ inline flatbuffers::Optional<bool> Table::GetOptional<uint8_t, bool>(
|
||||
|
||||
} // namespace flatbuffers
|
||||
|
||||
#endif // FLATBUFFERS_TABLE_H_
|
||||
#endif // FLATBUFFERS_TABLE_H_
|
||||
|
||||
Reference in New Issue
Block a user