mirror of
https://github.com/godotengine/godot.git
synced 2025-10-24 18:33:36 +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:
parent
03b13e0c69
commit
e956e80c1f
130 changed files with 967 additions and 511 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue