summaryrefslogtreecommitdiffstats
path: root/servers/rendering_server.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-03-01 14:56:06 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-03-01 14:56:06 +0100
commitc1377920cdf919e7316e43f5039c46ac91fd96e0 (patch)
tree0a865a1885f183aecdb170b3d0fbfc4e7bb6c935 /servers/rendering_server.cpp
parent1e950dea5aeec11227c2f84e1f0256601ead23ac (diff)
parentcd2032a90b7b1a499ccf08fbf62d70e0ac9bb8fa (diff)
downloadredot-engine-c1377920cdf919e7316e43f5039c46ac91fd96e0.tar.gz
Merge pull request #86743 from Mickeon/autocompletion-optimise-object
Optimise comparisons for Object's `get_argument_options`
Diffstat (limited to 'servers/rendering_server.cpp')
-rw-r--r--servers/rendering_server.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp
index e5d8800366..e0bf4fde42 100644
--- a/servers/rendering_server.cpp
+++ b/servers/rendering_server.cpp
@@ -2209,15 +2209,15 @@ void RenderingServer::fix_surface_compatibility(SurfaceData &p_surface, const St
#ifdef TOOLS_ENABLED
void RenderingServer::get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const {
- String pf = p_function;
+ const String pf = p_function;
if (p_idx == 0) {
if (pf == "global_shader_parameter_set" || pf == "global_shader_parameter_set_override" ||
pf == "global_shader_parameter_get" || pf == "global_shader_parameter_get_type" || pf == "global_shader_parameter_remove") {
- for (StringName E : global_shader_parameter_get_list()) {
+ for (const StringName &E : global_shader_parameter_get_list()) {
r_options->push_back(E.operator String().quote());
}
} else if (pf == "has_os_feature") {
- for (String E : { "\"rgtc\"", "\"s3tc\"", "\"bptc\"", "\"etc\"", "\"etc2\"", "\"astc\"" }) {
+ for (const String E : { "\"rgtc\"", "\"s3tc\"", "\"bptc\"", "\"etc\"", "\"etc2\"", "\"astc\"" }) {
r_options->push_back(E);
}
}