mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-03 18:57:51 +00:00
Simplify declarations of x-macro FLATBUFFERS_TD (#5638)
This commit is contained in:
parent
bcf1bd5c9e
commit
075e8d676b
13 changed files with 102 additions and 110 deletions
|
|
@ -142,15 +142,13 @@ class JavaGenerator : public BaseGenerator {
|
|||
|
||||
std::string GenTypeBasic(const Type &type) const {
|
||||
// clang-format off
|
||||
static const char * const java_typename[] = {
|
||||
#define FLATBUFFERS_TD(ENUM, IDLTYPE, \
|
||||
CTYPE, JTYPE, GTYPE, NTYPE, PTYPE, RTYPE, KTYPE) \
|
||||
static const char * const java_typename[] = {
|
||||
#define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, JTYPE, ...) \
|
||||
#JTYPE,
|
||||
FLATBUFFERS_GEN_TYPES(FLATBUFFERS_TD)
|
||||
#undef FLATBUFFERS_TD
|
||||
};
|
||||
FLATBUFFERS_GEN_TYPES(FLATBUFFERS_TD)
|
||||
#undef FLATBUFFERS_TD
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
return java_typename[type.base_type];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue