1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +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:
Rémi Verschelde
2020-05-14 13:23:58 +02:00
parent 710b34b702
commit 0be6d925dc
1552 changed files with 1 additions and 33876 deletions

View File

@@ -89,7 +89,6 @@ public:
virtual VisualScriptNodeInstance *instance(VisualScriptInstance *p_instance) = 0;
struct TypeGuess {
Variant::Type type;
StringName gdclass;
Ref<Script> script;
@@ -166,16 +165,13 @@ public:
};
class VisualScript : public Script {
GDCLASS(VisualScript, Script);
RES_BASE_EXTENSION("vs");
public:
struct SequenceConnection {
union {
struct {
uint64_t from_node : 24;
uint64_t from_output : 16;
@@ -185,15 +181,12 @@ public:
};
bool operator<(const SequenceConnection &p_connection) const {
return id < p_connection.id;
}
};
struct DataConnection {
union {
struct {
uint64_t from_node : 24;
uint64_t from_port : 8;
@@ -204,7 +197,6 @@ public:
};
bool operator<(const DataConnection &p_connection) const {
return id < p_connection.id;
}
};
@@ -431,7 +423,6 @@ public:
String to_string(bool *r_valid);
bool set_variable(const StringName &p_variable, const Variant &p_value) {
Map<StringName, Variant>::Element *E = variables.find(p_variable);
if (!E)
return false;
@@ -441,7 +432,6 @@ public:
}
bool get_variable(const StringName &p_variable, Variant *r_variable) const {
const Map<StringName, Variant>::Element *E = variables.find(p_variable);
if (!E)
return false;
@@ -476,7 +466,6 @@ public:
};
class VisualScriptFunctionState : public Reference {
GDCLASS(VisualScriptFunctionState, Reference);
friend class VisualScriptInstance;
@@ -507,11 +496,9 @@ public:
typedef Ref<VisualScriptNode> (*VisualScriptNodeRegisterFunc)(const String &p_type);
class VisualScriptLanguage : public ScriptLanguage {
Map<String, VisualScriptNodeRegisterFunc> register_funcs;
struct CallLevel {
Variant *stack;
Variant **work_mem;
const StringName *function;
@@ -540,7 +527,6 @@ public:
bool debug_break_parse(const String &p_file, int p_node, const String &p_error);
_FORCE_INLINE_ void enter_function(VisualScriptInstance *p_instance, const StringName *p_function, Variant *p_stack, Variant **p_work_mem, int *current_id) {
if (Thread::get_main_id() != Thread::get_caller_id())
return; //no support for other threads than main for now
@@ -563,7 +549,6 @@ public:
}
_FORCE_INLINE_ void exit_function() {
if (Thread::get_main_id() != Thread::get_caller_id())
return; //no support for other threads than main for now
@@ -571,7 +556,6 @@ public:
EngineDebugger::get_script_debugger()->set_depth(EngineDebugger::get_script_debugger()->get_depth() - 1);
if (_debug_call_stack_pos == 0) {
_debug_error = "Stack Underflow (Engine Bug)";
EngineDebugger::get_script_debugger()->debug(this);
return;
@@ -645,7 +629,6 @@ public:
//aid for registering
template <class T>
static Ref<VisualScriptNode> create_node_generic(const String &p_name) {
Ref<T> node;
node.instance();
return node;