1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Style: Cleanup code using text_editor/completion/use_single_quotes

This commit is contained in:
Rémi Verschelde
2021-08-13 21:24:02 +02:00
parent 4c3ece8c4b
commit 81512a3732
8 changed files with 29 additions and 33 deletions

View File

@@ -163,8 +163,7 @@ void Input::_bind_methods() {
void Input::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
#ifdef TOOLS_ENABLED
const String quote_style = EDITOR_DEF("text_editor/completion/use_single_quotes", 0) ? "'" : "\"";
const String quote_style = EDITOR_GET("text_editor/completion/use_single_quotes") ? "'" : "\"";
String pf = p_function;
if (p_idx == 0 && (pf == "is_action_pressed" || pf == "action_press" || pf == "action_release" ||
@@ -180,7 +179,7 @@ void Input::get_argument_options(const StringName &p_function, int p_idx, List<S
}
String name = pi.name.substr(pi.name.find("/") + 1, pi.name.length());
r_options->push_back(quote_style + name + quote_style);
r_options->push_back(name.quote(quote_style));
}
}
#endif