mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-18 15:08:57 +00:00
Ran src/clang-format-all.sh (#5617)
This commit is contained in:
committed by
Wouter van Oortmerssen
parent
33d5dd9bdd
commit
42c08cbca6
@@ -16,8 +16,7 @@
|
||||
|
||||
#include "flatbuffers/idl.h"
|
||||
#include "flatbuffers/util.h"
|
||||
|
||||
#include "monster_generated.h" // Already includes "flatbuffers/flatbuffers.h".
|
||||
#include "monster_generated.h" // Already includes "flatbuffers/flatbuffers.h".
|
||||
|
||||
using namespace MyGame::Sample;
|
||||
|
||||
@@ -30,7 +29,8 @@ int main(int /*argc*/, const char * /*argv*/[]) {
|
||||
std::string bfbs_file;
|
||||
bool ok =
|
||||
flatbuffers::LoadFile("tests/monster_test.fbs", false, &schema_file) &&
|
||||
flatbuffers::LoadFile("tests/monsterdata_test.golden", false, &json_file) &&
|
||||
flatbuffers::LoadFile("tests/monsterdata_test.golden", false,
|
||||
&json_file) &&
|
||||
flatbuffers::LoadFile("tests/monster_test.bfbs", true, &bfbs_file);
|
||||
if (!ok) {
|
||||
printf("couldn't load files!\n");
|
||||
|
||||
@@ -20,7 +20,7 @@ using namespace MyGame::Sample;
|
||||
|
||||
// Example how to use FlatBuffers to create and read binary buffers.
|
||||
|
||||
int main(int /*argc*/, const char * /*argv*/ []) {
|
||||
int main(int /*argc*/, const char * /*argv*/[]) {
|
||||
// Build up a serialized buffer algorithmically:
|
||||
flatbuffers::FlatBufferBuilder builder;
|
||||
|
||||
|
||||
@@ -16,14 +16,13 @@
|
||||
|
||||
#include "flatbuffers/idl.h"
|
||||
#include "flatbuffers/util.h"
|
||||
|
||||
#include "monster_generated.h" // Already includes "flatbuffers/flatbuffers.h".
|
||||
|
||||
using namespace MyGame::Sample;
|
||||
|
||||
// This is an example of parsing text straight into a buffer and then
|
||||
// generating flatbuffer (JSON) text from the buffer.
|
||||
int main(int /*argc*/, const char * /*argv*/ []) {
|
||||
int main(int /*argc*/, const char * /*argv*/[]) {
|
||||
// load FlatBuffer schema (.fbs) and JSON from disk
|
||||
std::string schemafile;
|
||||
std::string jsonfile;
|
||||
|
||||
Reference in New Issue
Block a user