summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-04-25 16:40:58 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-04-26 14:59:28 +0200
commit5d124c4a8f86176e8adafab3d3703f28e597cb12 (patch)
tree2e0fdd8fc6f7318ed39b72f325c21dbe967f5445 /modules/mono
parent15a85fe9713668f8ba6143352fd27d419a96ba83 (diff)
Remove uses of `auto` for better readability and online code reviews
The current code style guidelines forbid the use of `auto`. Some uses of `auto` are still present, such as in UWP code (which can't be currently tested) and macros (where removing `auto` isn't easy).
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/csharp_script.cpp4
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 43f57a7caa..09f3ea1f50 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -2016,7 +2016,7 @@ void CSharpInstance::connect_event_signals() {
StringName signal_name = event_signal.field->get_name();
// TODO: Use pooling for ManagedCallable instances.
- auto event_signal_callable = memnew(EventSignalCallable(owner, &event_signal));
+ EventSignalCallable *event_signal_callable = memnew(EventSignalCallable(owner, &event_signal));
Callable callable(event_signal_callable);
connected_event_signals.push_back(callable);
@@ -2027,7 +2027,7 @@ void CSharpInstance::connect_event_signals() {
void CSharpInstance::disconnect_event_signals() {
for (const List<Callable>::Element *E = connected_event_signals.front(); E; E = E->next()) {
const Callable &callable = E->get();
- auto event_signal_callable = static_cast<const EventSignalCallable *>(callable.get_custom());
+ const EventSignalCallable *event_signal_callable = static_cast<const EventSignalCallable *>(callable.get_custom());
owner->disconnect(event_signal_callable->get_signal(), callable);
}
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index 560788fb3a..c523d381f6 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -119,11 +119,11 @@ void gd_mono_profiler_init() {
const String env_var_name = "MONO_ENV_OPTIONS";
if (OS::get_singleton()->has_environment(env_var_name)) {
- const auto mono_env_ops = OS::get_singleton()->get_environment(env_var_name);
+ const String mono_env_ops = OS::get_singleton()->get_environment(env_var_name);
// Usually MONO_ENV_OPTIONS looks like: --profile=jb:prof=timeline,ctl=remote,host=127.0.0.1:55467
const String prefix = "--profile=";
if (mono_env_ops.begins_with(prefix)) {
- const auto ops = mono_env_ops.substr(prefix.length(), mono_env_ops.length());
+ const String ops = mono_env_ops.substr(prefix.length(), mono_env_ops.length());
mono_profiler_load(ops.utf8());
}
}