You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
This commit is contained in:
@@ -41,7 +41,6 @@
|
||||
// helper stuff
|
||||
|
||||
static Error save_file(const String &p_path, const List<String> &p_content) {
|
||||
|
||||
FileAccessRef file = FileAccess::open(p_path, FileAccess::WRITE);
|
||||
|
||||
ERR_FAIL_COND_V(!file, ERR_FILE_CANT_WRITE);
|
||||
@@ -146,7 +145,6 @@ static String get_type_name(const PropertyInfo &info) {
|
||||
struct MethodInfoComparator {
|
||||
StringName::AlphCompare compare;
|
||||
bool operator()(const MethodInfo &p_a, const MethodInfo &p_b) const {
|
||||
|
||||
return compare(p_a.name, p_b.name);
|
||||
}
|
||||
};
|
||||
@@ -154,7 +152,6 @@ struct MethodInfoComparator {
|
||||
struct PropertyInfoComparator {
|
||||
StringName::AlphCompare compare;
|
||||
bool operator()(const PropertyInfo &p_a, const PropertyInfo &p_b) const {
|
||||
|
||||
return compare(p_a.name, p_b.name);
|
||||
}
|
||||
};
|
||||
@@ -162,7 +159,6 @@ struct PropertyInfoComparator {
|
||||
struct ConstantAPIComparator {
|
||||
NoCaseComparator compare;
|
||||
bool operator()(const ConstantAPI &p_a, const ConstantAPI &p_b) const {
|
||||
|
||||
return compare(p_a.constant_name, p_b.constant_name);
|
||||
}
|
||||
};
|
||||
@@ -171,7 +167,6 @@ struct ConstantAPIComparator {
|
||||
* Reads the entire Godot API to a list
|
||||
*/
|
||||
List<ClassAPI> generate_c_api_classes() {
|
||||
|
||||
List<ClassAPI> api;
|
||||
|
||||
List<StringName> classes;
|
||||
@@ -410,7 +405,6 @@ List<ClassAPI> generate_c_api_classes() {
|
||||
* Generates the JSON source from the API in p_api
|
||||
*/
|
||||
static List<String> generate_c_api_json(const List<ClassAPI> &p_api) {
|
||||
|
||||
// I'm sorry for the \t mess
|
||||
|
||||
List<String> source;
|
||||
@@ -520,7 +514,6 @@ static List<String> generate_c_api_json(const List<ClassAPI> &p_api) {
|
||||
* p_path
|
||||
*/
|
||||
Error generate_c_api(const String &p_path) {
|
||||
|
||||
#ifndef TOOLS_ENABLED
|
||||
return ERR_BUG;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user