mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 08:23:29 +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
|
@ -282,7 +282,8 @@ struct Command {
|
|||
Dictionary dict;
|
||||
dict["title"] = title;
|
||||
dict["command"] = command;
|
||||
if (arguments.size()) dict["arguments"] = arguments;
|
||||
if (arguments.size())
|
||||
dict["arguments"] = arguments;
|
||||
return dict;
|
||||
}
|
||||
};
|
||||
|
@ -946,16 +947,20 @@ struct CompletionItem {
|
|||
dict["preselect"] = preselect;
|
||||
dict["sortText"] = sortText;
|
||||
dict["filterText"] = filterText;
|
||||
if (commitCharacters.size()) dict["commitCharacters"] = commitCharacters;
|
||||
if (commitCharacters.size())
|
||||
dict["commitCharacters"] = commitCharacters;
|
||||
dict["command"] = command.to_json();
|
||||
}
|
||||
return dict;
|
||||
}
|
||||
|
||||
void load(const Dictionary &p_dict) {
|
||||
if (p_dict.has("label")) label = p_dict["label"];
|
||||
if (p_dict.has("kind")) kind = p_dict["kind"];
|
||||
if (p_dict.has("detail")) detail = p_dict["detail"];
|
||||
if (p_dict.has("label"))
|
||||
label = p_dict["label"];
|
||||
if (p_dict.has("kind"))
|
||||
kind = p_dict["kind"];
|
||||
if (p_dict.has("detail"))
|
||||
detail = p_dict["detail"];
|
||||
if (p_dict.has("documentation")) {
|
||||
Variant doc = p_dict["documentation"];
|
||||
if (doc.get_type() == Variant::STRING) {
|
||||
|
@ -965,12 +970,18 @@ struct CompletionItem {
|
|||
documentation.value = v["value"];
|
||||
}
|
||||
}
|
||||
if (p_dict.has("deprecated")) deprecated = p_dict["deprecated"];
|
||||
if (p_dict.has("preselect")) preselect = p_dict["preselect"];
|
||||
if (p_dict.has("sortText")) sortText = p_dict["sortText"];
|
||||
if (p_dict.has("filterText")) filterText = p_dict["filterText"];
|
||||
if (p_dict.has("insertText")) insertText = p_dict["insertText"];
|
||||
if (p_dict.has("data")) data = p_dict["data"];
|
||||
if (p_dict.has("deprecated"))
|
||||
deprecated = p_dict["deprecated"];
|
||||
if (p_dict.has("preselect"))
|
||||
preselect = p_dict["preselect"];
|
||||
if (p_dict.has("sortText"))
|
||||
sortText = p_dict["sortText"];
|
||||
if (p_dict.has("filterText"))
|
||||
filterText = p_dict["filterText"];
|
||||
if (p_dict.has("insertText"))
|
||||
insertText = p_dict["insertText"];
|
||||
if (p_dict.has("data"))
|
||||
data = p_dict["data"];
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue