Run clang-format -i **/*.cpp (#8865)

This commit is contained in:
Derek Bailey
2025-12-19 10:42:57 -08:00
committed by GitHub
parent d9fde67eb5
commit fb55e0c9de
24 changed files with 213 additions and 192 deletions

View File

@@ -56,16 +56,16 @@ static Namer::Config JavaDefaultConfig() {
static std::set<std::string> JavaKeywords() {
return {
"abstract", "assert", "boolean", "break", "byte",
"case", "catch", "char", "class", "const",
"continue", "default", "do", "double", "else",
"enum", "extends", "final", "finally", "float",
"for", "goto", "if", "implements","import",
"instanceof","int", "interface", "long", "native",
"new", "notify", "package", "private", "protected",
"public", "return", "short", "static", "strictfp",
"super", "switch", "synchronized","this", "throw",
"throws", "transient","try", "void", "volatile",
"abstract", "assert", "boolean", "break", "byte",
"case", "catch", "char", "class", "const",
"continue", "default", "do", "double", "else",
"enum", "extends", "final", "finally", "float",
"for", "goto", "if", "implements", "import",
"instanceof", "int", "interface", "long", "native",
"new", "notify", "package", "private", "protected",
"public", "return", "short", "static", "strictfp",
"super", "switch", "synchronized", "this", "throw",
"throws", "transient", "try", "void", "volatile",
"while",
};
}
@@ -1468,7 +1468,8 @@ class JavaGenerator : public BaseGenerator {
" " + variable_name + "Type = " + field_name + "Type(" +
type_params + ");\n";
code += indent + variable_name + ".setType(" + variable_name + "Type);\n";
code += indent + "com.google.flatbuffers.Table " + variable_name + "Value;\n";
code +=
indent + "com.google.flatbuffers.Table " + variable_name + "Value;\n";
code += indent + "switch (" + variable_name + "Type) {\n";
for (auto eit = enum_def.Vals().begin(); eit != enum_def.Vals().end();
++eit) {