mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 18:05:42 +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:
@@ -6,6 +6,13 @@
|
||||
|
||||
#include "flatbuffers/flatbuffers.h"
|
||||
|
||||
// Ensure the included flatbuffers.h is the same version as when this file was
|
||||
// generated, otherwise it may not be compatible.
|
||||
static_assert(FLATBUFFERS_VERSION_MAJOR == 22 &&
|
||||
FLATBUFFERS_VERSION_MINOR == 9 &&
|
||||
FLATBUFFERS_VERSION_REVISION == 29,
|
||||
"Non-compatible flatbuffers version included");
|
||||
|
||||
#include "header_generated.h"
|
||||
|
||||
namespace FlatGeobuf {
|
||||
@@ -66,7 +73,7 @@ struct Geometry FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table {
|
||||
verifier.VerifyVector(t()) &&
|
||||
VerifyOffset(verifier, VT_TM) &&
|
||||
verifier.VerifyVector(tm()) &&
|
||||
VerifyField<uint8_t>(verifier, VT_TYPE) &&
|
||||
VerifyField<uint8_t>(verifier, VT_TYPE, 1) &&
|
||||
VerifyOffset(verifier, VT_PARTS) &&
|
||||
verifier.VerifyVector(parts()) &&
|
||||
verifier.VerifyVectorOfTables(parts()) &&
|
||||
@@ -121,7 +128,7 @@ inline flatbuffers::Offset<Geometry> CreateGeometry(
|
||||
flatbuffers::Offset<flatbuffers::Vector<double>> m = 0,
|
||||
flatbuffers::Offset<flatbuffers::Vector<double>> t = 0,
|
||||
flatbuffers::Offset<flatbuffers::Vector<uint64_t>> tm = 0,
|
||||
FlatGeobuf::GeometryType type = FlatGeobuf::GeometryType::Unknown,
|
||||
FlatGeobuf::GeometryType type = FlatGeobuf::GeometryType_Unknown,
|
||||
flatbuffers::Offset<flatbuffers::Vector<flatbuffers::Offset<FlatGeobuf::Geometry>>> parts = 0) {
|
||||
GeometryBuilder builder_(_fbb);
|
||||
builder_.add_parts(parts);
|
||||
@@ -143,7 +150,7 @@ inline flatbuffers::Offset<Geometry> CreateGeometryDirect(
|
||||
const std::vector<double> *m = nullptr,
|
||||
const std::vector<double> *t = nullptr,
|
||||
const std::vector<uint64_t> *tm = nullptr,
|
||||
FlatGeobuf::GeometryType type = FlatGeobuf::GeometryType::Unknown,
|
||||
FlatGeobuf::GeometryType type = FlatGeobuf::GeometryType_Unknown,
|
||||
const std::vector<flatbuffers::Offset<FlatGeobuf::Geometry>> *parts = nullptr) {
|
||||
auto ends__ = ends ? _fbb.CreateVector<uint32_t>(*ends) : 0;
|
||||
auto xy__ = xy ? _fbb.CreateVector<double>(*xy) : 0;
|
||||
|
||||
Reference in New Issue
Block a user