summaryrefslogtreecommitdiffstats
path: root/modules/mono/utils/string_utils.cpp
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2020-07-05 19:19:36 +0200
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2020-07-05 19:19:36 +0200
commit2511c439727226f64def8b15b38d084db187cf55 (patch)
treef56b1716af16025a32795691161b75c8a0362fb9 /modules/mono/utils/string_utils.cpp
parent772f693e5b8b5912d422e8effb8d6a72260edcfc (diff)
downloadredot-engine-2511c439727226f64def8b15b38d084db187cf55.tar.gz
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.cpp12
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;