mirror of
https://github.com/google/flatbuffers.git
synced 2025-04-08 09:12:14 +08:00
don't emit flatbuffers include in bfbs generated output (#7968)
This commit is contained in:
parent
ae6753684e
commit
b67f1ad6d0
@ -377,10 +377,8 @@ class CppGenerator : public BaseGenerator {
|
|||||||
code_ += "#pragma clang system_header\n\n";
|
code_ += "#pragma clang system_header\n\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
code_ += "#include \"flatbuffers/flatbuffers.h\"";
|
code_ += "#include <cstddef>";
|
||||||
code_ += "";
|
code_ += "#include <cstdint>";
|
||||||
GenFlatbuffersVersionCheck();
|
|
||||||
code_ += "";
|
|
||||||
|
|
||||||
SetNameSpace(struct_def.defined_namespace);
|
SetNameSpace(struct_def.defined_namespace);
|
||||||
auto name = Name(struct_def);
|
auto name = Name(struct_def);
|
||||||
|
@ -4,15 +4,8 @@
|
|||||||
#ifndef FLATBUFFERS_GENERATED_TEST64BIT_BFBS_H_
|
#ifndef FLATBUFFERS_GENERATED_TEST64BIT_BFBS_H_
|
||||||
#define FLATBUFFERS_GENERATED_TEST64BIT_BFBS_H_
|
#define FLATBUFFERS_GENERATED_TEST64BIT_BFBS_H_
|
||||||
|
|
||||||
#include "flatbuffers/flatbuffers.h"
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
// 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 == 23 &&
|
|
||||||
FLATBUFFERS_VERSION_MINOR == 5 &&
|
|
||||||
FLATBUFFERS_VERSION_REVISION == 9,
|
|
||||||
"Non-compatible flatbuffers version included");
|
|
||||||
|
|
||||||
struct RootTableBinarySchema {
|
struct RootTableBinarySchema {
|
||||||
static const uint8_t *data() {
|
static const uint8_t *data() {
|
||||||
// Buffer containing the binary schema.
|
// Buffer containing the binary schema.
|
||||||
|
@ -4,15 +4,8 @@
|
|||||||
#ifndef FLATBUFFERS_GENERATED_MONSTERTEST_MYGAME_EXAMPLE_BFBS_H_
|
#ifndef FLATBUFFERS_GENERATED_MONSTERTEST_MYGAME_EXAMPLE_BFBS_H_
|
||||||
#define FLATBUFFERS_GENERATED_MONSTERTEST_MYGAME_EXAMPLE_BFBS_H_
|
#define FLATBUFFERS_GENERATED_MONSTERTEST_MYGAME_EXAMPLE_BFBS_H_
|
||||||
|
|
||||||
#include "flatbuffers/flatbuffers.h"
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
// 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 == 23 &&
|
|
||||||
FLATBUFFERS_VERSION_MINOR == 5 &&
|
|
||||||
FLATBUFFERS_VERSION_REVISION == 9,
|
|
||||||
"Non-compatible flatbuffers version included");
|
|
||||||
|
|
||||||
namespace MyGame {
|
namespace MyGame {
|
||||||
namespace Example {
|
namespace Example {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user