diff options
| author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2020-07-05 19:19:36 +0200 |
|---|---|---|
| committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2020-07-05 19:19:36 +0200 |
| commit | 2511c439727226f64def8b15b38d084db187cf55 (patch) | |
| tree | f56b1716af16025a32795691161b75c8a0362fb9 /modules/mono/mono_gd/gd_mono_field.cpp | |
| parent | 772f693e5b8b5912d422e8effb8d6a72260edcfc (diff) | |
| download | redot-engine-2511c439727226f64def8b15b38d084db187cf55.tar.gz | |
Mono/C#: Fix several clang-tidy warnings and cleanup
Diffstat (limited to 'modules/mono/mono_gd/gd_mono_field.cpp')
| -rw-r--r-- | modules/mono/mono_gd/gd_mono_field.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/mono/mono_gd/gd_mono_field.cpp b/modules/mono/mono_gd/gd_mono_field.cpp index 948170f51c..563c45e71f 100644 --- a/modules/mono/mono_gd/gd_mono_field.cpp +++ b/modules/mono/mono_gd/gd_mono_field.cpp @@ -597,11 +597,13 @@ String GDMonoField::get_string_value(MonoObject *p_object) { bool GDMonoField::has_attribute(GDMonoClass *p_attr_class) { ERR_FAIL_NULL_V(p_attr_class, false); - if (!attrs_fetched) + if (!attrs_fetched) { fetch_attributes(); + } - if (!attributes) + if (!attributes) { return false; + } return mono_custom_attrs_has_attr(attributes, p_attr_class->get_mono_ptr()); } @@ -609,11 +611,13 @@ bool GDMonoField::has_attribute(GDMonoClass *p_attr_class) { MonoObject *GDMonoField::get_attribute(GDMonoClass *p_attr_class) { ERR_FAIL_NULL_V(p_attr_class, nullptr); - if (!attrs_fetched) + if (!attrs_fetched) { fetch_attributes(); + } - if (!attributes) + if (!attributes) { return nullptr; + } return mono_custom_attrs_get_attr(attributes, p_attr_class->get_mono_ptr()); } |
