From 117e3b0679209f2aa55cbee18c4036e7da4bd4b3 Mon Sep 17 00:00:00 2001 From: Luca Longinotti Date: Tue, 5 Mar 2019 18:15:05 +0100 Subject: [PATCH] idl_gen_cpp.cpp: move clang-format on/off outside of declaration, so they are kept properly aligned automatically. --- src/idl_gen_cpp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/idl_gen_cpp.cpp b/src/idl_gen_cpp.cpp index e97ed6476..28cb2d19f 100644 --- a/src/idl_gen_cpp.cpp +++ b/src/idl_gen_cpp.cpp @@ -498,15 +498,15 @@ class CppGenerator : public BaseGenerator { // Return a C++ type from the table in idl.h std::string GenTypeBasic(const Type &type, bool user_facing_type) const { + // clang-format off static const char *const ctypename[] = { -// clang-format off #define FLATBUFFERS_TD(ENUM, IDLTYPE, CTYPE, JTYPE, GTYPE, NTYPE, PTYPE, \ RTYPE) \ #CTYPE, FLATBUFFERS_GEN_TYPES(FLATBUFFERS_TD) #undef FLATBUFFERS_TD - // clang-format on }; + // clang-format on if (user_facing_type) { if (type.enum_def) return WrapInNameSpace(*type.enum_def); if (type.base_type == BASE_TYPE_BOOL) return "bool";