Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
fuchsia.googlesource.com-third_party-flatbuffers
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fuchsia-mirror
fuchsia.googlesource.com-third_party-flatbuffers
Commits
40fffc8f
Commit
40fffc8f
authored
9 years ago
by
Amol Deshpande
Browse files
Options
Downloads
Patches
Plain Diff
fix code formatting and bug with losing enums when using --gen-onefile
parent
2f761418
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/source/Compiler.md
+2
-0
2 additions, 0 deletions
docs/source/Compiler.md
src/flatc.cpp
+2
-2
2 additions, 2 deletions
src/flatc.cpp
src/idl_gen_general.cpp
+1
-1
1 addition, 1 deletion
src/idl_gen_general.cpp
with
5 additions
and
3 deletions
docs/source/Compiler.md
+
2
−
0
View file @
40fffc8f
...
@@ -57,6 +57,8 @@ be generated for each file processed:
...
@@ -57,6 +57,8 @@ be generated for each file processed:
- `
--gen-mutable
` : Generate additional non-const accessors for mutating
- `
--gen-mutable
` : Generate additional non-const accessors for mutating
FlatBuffers in-place.
FlatBuffers in-place.
- `
--gen-onefile
` : Generate single output file (useful for C#)
- `
--raw-binary
` : Allow binaries without a file_indentifier to be read.
- `
--raw-binary
` : Allow binaries without a file_indentifier to be read.
This may crash flatc given a mismatched schema.
This may crash flatc given a mismatched schema.
...
...
This diff is collapsed.
Click to expand it.
src/flatc.cpp
+
2
−
2
View file @
40fffc8f
...
@@ -141,9 +141,9 @@ int main(int argc, const char *argv[]) {
...
@@ -141,9 +141,9 @@ int main(int argc, const char *argv[]) {
opts
.
mutable_buffer
=
true
;
opts
.
mutable_buffer
=
true
;
}
else
if
(
arg
==
"--gen-includes"
)
{
}
else
if
(
arg
==
"--gen-includes"
)
{
opts
.
include_dependence_headers
=
true
;
opts
.
include_dependence_headers
=
true
;
}
else
if
(
arg
==
"--gen-onefile"
)
{
}
else
if
(
arg
==
"--gen-onefile"
)
{
opts
.
one_file
=
true
;
opts
.
one_file
=
true
;
}
else
if
(
arg
==
"--raw-binary"
)
{
}
else
if
(
arg
==
"--raw-binary"
)
{
raw_binary
=
true
;
raw_binary
=
true
;
}
else
if
(
arg
==
"--"
)
{
// Separator between text and binary inputs.
}
else
if
(
arg
==
"--"
)
{
// Separator between text and binary inputs.
binary_files_from
=
filenames
.
size
();
binary_files_from
=
filenames
.
size
();
...
...
This diff is collapsed.
Click to expand it.
src/idl_gen_general.cpp
+
1
−
1
View file @
40fffc8f
...
@@ -901,7 +901,7 @@ bool GenerateGeneral(const Parser &parser,
...
@@ -901,7 +901,7 @@ bool GenerateGeneral(const Parser &parser,
std
::
string
enumcode
;
std
::
string
enumcode
;
GenEnum
(
lang
,
**
it
,
&
enumcode
);
GenEnum
(
lang
,
**
it
,
&
enumcode
);
if
(
opts
.
one_file
)
{
if
(
opts
.
one_file
)
{
one_file_code
=
enumcode
;
one_file_code
+
=
enumcode
;
}
}
else
{
else
{
if
(
!
SaveClass
(
lang
,
parser
,
(
**
it
).
name
,
enumcode
,
path
,
false
,
false
))
if
(
!
SaveClass
(
lang
,
parser
,
(
**
it
).
name
,
enumcode
,
path
,
false
,
false
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment