mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-29 08:32:00 +00:00
Rework cmake flatc codegeneration (#7938)
* start fixing the code generation steps * reworked flatc generation in cmake
This commit is contained in:
@@ -271,7 +271,7 @@ inline bool operator!=(const ArrayStruct &lhs, const ArrayStruct &rhs) {
|
||||
|
||||
struct ArrayTableT : public ::flatbuffers::NativeTable {
|
||||
typedef ArrayTable TableType;
|
||||
flatbuffers::unique_ptr<MyGame::Example::ArrayStruct> a{};
|
||||
std::unique_ptr<MyGame::Example::ArrayStruct> a{};
|
||||
ArrayTableT() = default;
|
||||
ArrayTableT(const ArrayTableT &o);
|
||||
ArrayTableT(ArrayTableT&&) FLATBUFFERS_NOEXCEPT = default;
|
||||
@@ -360,7 +360,7 @@ inline ArrayTableT *ArrayTable::UnPack(const ::flatbuffers::resolver_function_t
|
||||
inline void ArrayTable::UnPackTo(ArrayTableT *_o, const ::flatbuffers::resolver_function_t *_resolver) const {
|
||||
(void)_o;
|
||||
(void)_resolver;
|
||||
{ auto _e = a(); if (_e) _o->a = flatbuffers::unique_ptr<MyGame::Example::ArrayStruct>(new MyGame::Example::ArrayStruct(*_e)); }
|
||||
{ auto _e = a(); if (_e) _o->a = std::unique_ptr<MyGame::Example::ArrayStruct>(new MyGame::Example::ArrayStruct(*_e)); }
|
||||
}
|
||||
|
||||
inline ::flatbuffers::Offset<ArrayTable> ArrayTable::Pack(::flatbuffers::FlatBufferBuilder &_fbb, const ArrayTableT* _o, const ::flatbuffers::rehasher_function_t *_rehasher) {
|
||||
@@ -521,16 +521,16 @@ inline void FinishSizePrefixedArrayTableBuffer(
|
||||
fbb.FinishSizePrefixed(root, ArrayTableIdentifier());
|
||||
}
|
||||
|
||||
inline flatbuffers::unique_ptr<MyGame::Example::ArrayTableT> UnPackArrayTable(
|
||||
inline std::unique_ptr<MyGame::Example::ArrayTableT> UnPackArrayTable(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return flatbuffers::unique_ptr<MyGame::Example::ArrayTableT>(GetArrayTable(buf)->UnPack(res));
|
||||
return std::unique_ptr<MyGame::Example::ArrayTableT>(GetArrayTable(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
inline flatbuffers::unique_ptr<MyGame::Example::ArrayTableT> UnPackSizePrefixedArrayTable(
|
||||
inline std::unique_ptr<MyGame::Example::ArrayTableT> UnPackSizePrefixedArrayTable(
|
||||
const void *buf,
|
||||
const ::flatbuffers::resolver_function_t *res = nullptr) {
|
||||
return flatbuffers::unique_ptr<MyGame::Example::ArrayTableT>(GetSizePrefixedArrayTable(buf)->UnPack(res));
|
||||
return std::unique_ptr<MyGame::Example::ArrayTableT>(GetSizePrefixedArrayTable(buf)->UnPack(res));
|
||||
}
|
||||
|
||||
} // namespace Example
|
||||
|
||||
Reference in New Issue
Block a user