1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-10 13:00:37 +00:00

Style: Apply new changes from clang-format 8.0

It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
This commit is contained in:
Rémi Verschelde
2019-04-09 17:08:36 +02:00
parent 4b2c79c471
commit c8994b56f9
85 changed files with 382 additions and 251 deletions

View File

@@ -1070,7 +1070,8 @@ static bool _guess_expression_type(GDScriptCompletionContext &p_context, const G
case GDScriptParser::OperatorNode::OP_BIT_AND: vop = Variant::OP_BIT_AND; break;
case GDScriptParser::OperatorNode::OP_BIT_OR: vop = Variant::OP_BIT_OR; break;
case GDScriptParser::OperatorNode::OP_BIT_XOR: vop = Variant::OP_BIT_XOR; break;
default: {}
default: {
}
}
if (vop == Variant::OP_MAX) {
@@ -1125,7 +1126,8 @@ static bool _guess_expression_type(GDScriptCompletionContext &p_context, const G
} break;
}
} break;
default: {}
default: {
}
}
// It may have found a null, but that's never useful
@@ -3380,7 +3382,8 @@ Error GDScriptLanguage::lookup_code(const String &p_code, const String &p_symbol
return OK;
}
} break;
default: {}
default: {
}
}
return ERR_CANT_RESOLVE;

View File

@@ -888,7 +888,8 @@ GDScriptParser::Node *GDScriptParser::_parse_expression(Node *p_parent, bool p_s
case GDScriptTokenizer::TK_OP_SUB: e.op = OperatorNode::OP_NEG; break;
case GDScriptTokenizer::TK_OP_NOT: e.op = OperatorNode::OP_NOT; break;
case GDScriptTokenizer::TK_OP_BIT_INVERT: e.op = OperatorNode::OP_BIT_INVERT; break;
default: {}
default: {
}
}
tokenizer->advance();
@@ -1875,7 +1876,9 @@ GDScriptParser::Node *GDScriptParser::_reduce_expression(Node *p_node, bool p_to
}
} break;
default: { break; }
default: {
break;
}
}
//now se if all are constants
if (!all_constants)
@@ -1988,7 +1991,9 @@ GDScriptParser::Node *GDScriptParser::_reduce_expression(Node *p_node, bool p_to
return op->arguments[2];
}
} break;
default: { ERR_FAIL_V(op); }
default: {
ERR_FAIL_V(op);
}
}
ERR_FAIL_V(op);
@@ -6351,7 +6356,8 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
case Variant::COLOR: {
error = index_type.builtin_type != Variant::INT && index_type.builtin_type != Variant::STRING;
} break;
default: {}
default: {
}
}
}
if (error) {
@@ -6469,7 +6475,8 @@ GDScriptParser::DataType GDScriptParser::_reduce_node_type(Node *p_node) {
}
}
} break;
default: {}
default: {
}
}
p_node->set_datatype(_resolve_type(node_type, p_node->line));

View File

@@ -339,7 +339,8 @@ StringName GDScriptTokenizer::get_token_literal(int p_offset) const {
return "null";
case Variant::BOOL:
return value ? "true" : "false";
default: {}
default: {
}
}
}
case TK_OP_AND:
@@ -1302,7 +1303,8 @@ Vector<uint8_t> GDScriptTokenizerBuffer::parse_code_string(const String &p_code)
ERR_FAIL_V(Vector<uint8_t>());
} break;
default: {}
default: {
}
};
token_array.push_back(token);