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/utils/string_utils.cpp | |
parent | 0287508dcdf51c7349b41aabb7679061a5147fdf (diff) | |
parent | 2511c439727226f64def8b15b38d084db187cf55 (diff) |
Merge pull request #40137 from neikeq/fix-clangtidy-warnings-mono
Mono/C#: Fix several clang-tidy warnings and cleanup
Diffstat (limited to 'modules/mono/utils/string_utils.cpp')
-rw-r--r-- | modules/mono/utils/string_utils.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/mono/utils/string_utils.cpp b/modules/mono/utils/string_utils.cpp index da1b719d99..f8d9804de4 100644 --- a/modules/mono/utils/string_utils.cpp +++ b/modules/mono/utils/string_utils.cpp @@ -38,14 +38,16 @@ namespace { int sfind(const String &p_text, int p_from) { - if (p_from < 0) + if (p_from < 0) { return -1; + } int src_len = 2; int len = p_text.length(); - if (len == 0) + if (len == 0) { return -1; + } const CharType *src = p_text.c_str(); @@ -75,8 +77,9 @@ int sfind(const String &p_text, int p_from) { } } - if (found) + if (found) { return i; + } } return -1; @@ -85,8 +88,9 @@ int sfind(const String &p_text, int p_from) { } // namespace String sformat(const String &p_text, const Variant &p1, const Variant &p2, const Variant &p3, const Variant &p4, const Variant &p5) { - if (p_text.length() < 2) + if (p_text.length() < 2) { return p_text; + } Array args; |