diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2020-07-05 22:32:27 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-05 22:32:27 +0200 |
| commit | 347a55d4c22f8e1ee1ea62112063c3b5394044ad (patch) | |
| tree | 313053a64e20cc77c692f03d2ce2cd93577a6e6e /modules/mono/mono_gd/gd_mono_field.cpp | |
| parent | 0287508dcdf51c7349b41aabb7679061a5147fdf (diff) | |
| parent | 2511c439727226f64def8b15b38d084db187cf55 (diff) | |
| download | redot-engine-347a55d4c22f8e1ee1ea62112063c3b5394044ad.tar.gz | |
Merge pull request #40137 from neikeq/fix-clangtidy-warnings-mono
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()); } |
