Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
flatbuffers
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
flatbuffers
Commits
d9767b83
Commit
d9767b83
authored
Jul 09, 2016
by
Jonathan Tullett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for issue #3922
Also, clean up redundant ';' at end of java classes.
parent
193a6317
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
idl_gen_general.cpp
src/idl_gen_general.cpp
+9
-3
No files found.
src/idl_gen_general.cpp
View file @
d9767b83
...
...
@@ -545,7 +545,7 @@ void GenEnum(EnumDef &enum_def, std::string *code_ptr) {
// "too sparse". Change at will.
static
const
int
kMaxSparseness
=
5
;
if
(
range
/
static_cast
<
int64_t
>
(
enum_def
.
vals
.
vec
.
size
())
<
kMaxSparseness
)
{
code
+=
"
\n
p
rivate
static"
;
code
+=
"
\n
p
ublic
static"
;
code
+=
lang_
.
const_decl
;
code
+=
lang_
.
string_type
;
code
+=
"[] names = { "
;
...
...
@@ -568,7 +568,10 @@ void GenEnum(EnumDef &enum_def, std::string *code_ptr) {
}
// Close the class
code
+=
"};
\n\n
"
;
code
+=
"}"
;
// Java does not need the closing semi-colon on class definitions.
code
+=
(
lang_
.
language
!=
IDLOptions
::
kJava
)
?
";"
:
""
;
code
+=
"
\n\n
"
;
}
// Returns the function name that is able to read a value of the given type.
...
...
@@ -1126,7 +1129,10 @@ void GenStruct(StructDef &struct_def, std::string *code_ptr) {
code
+=
"); }
\n
"
;
}
}
code
+=
"};
\n\n
"
;
code
+=
"}"
;
// Java does not need the closing semi-colon on class definitions.
code
+=
(
lang_
.
language
!=
IDLOptions
::
kJava
)
?
";"
:
""
;
code
+=
"
\n\n
"
;
}
const
LanguageParameters
&
lang_
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment