mirror of
https://github.com/vee1e/flatbuffers.git
synced 2026-09-02 18:27:46 +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
|
|
@ -667,15 +667,15 @@ class PythonGenerator : public BaseGenerator {
|
|||
}
|
||||
|
||||
std::string GenTypeBasic(const Type &type) {
|
||||
static const char *ctypename[] = {
|
||||
// clang-format off
|
||||
static const char *ctypename[] = {
|
||||
#define FLATBUFFERS_TD(ENUM, IDLTYPE, \
|
||||
CTYPE, JTYPE, GTYPE, NTYPE, PTYPE, RTYPE, KTYPE) \
|
||||
CTYPE, JTYPE, GTYPE, NTYPE, PTYPE, ...) \
|
||||
#PTYPE,
|
||||
FLATBUFFERS_GEN_TYPES(FLATBUFFERS_TD)
|
||||
#undef FLATBUFFERS_TD
|
||||
// clang-format on
|
||||
};
|
||||
// clang-format on
|
||||
return ctypename[IsArray(type) ? type.VectorType().base_type
|
||||
: type.base_type];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue