You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-03 16:55:53 +00:00
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
This commit is contained in:
@@ -972,22 +972,26 @@ bool test_31() {
|
||||
String a = "";
|
||||
success = a[0] == 0;
|
||||
OS::get_singleton()->print("Is 0 String[0]:, %s\n", success ? "OK" : "FAIL");
|
||||
if (!success) state = false;
|
||||
if (!success)
|
||||
state = false;
|
||||
|
||||
String b = "Godot";
|
||||
success = b[b.size()] == 0;
|
||||
OS::get_singleton()->print("Is 0 String[size()]:, %s\n", success ? "OK" : "FAIL");
|
||||
if (!success) state = false;
|
||||
if (!success)
|
||||
state = false;
|
||||
|
||||
const String c = "";
|
||||
success = c[0] == 0;
|
||||
OS::get_singleton()->print("Is 0 const String[0]:, %s\n", success ? "OK" : "FAIL");
|
||||
if (!success) state = false;
|
||||
if (!success)
|
||||
state = false;
|
||||
|
||||
const String d = "Godot";
|
||||
success = d[d.size()] == 0;
|
||||
OS::get_singleton()->print("Is 0 const String[size()]:, %s\n", success ? "OK" : "FAIL");
|
||||
if (!success) state = false;
|
||||
if (!success)
|
||||
state = false;
|
||||
|
||||
return state;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user