1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Mono/C#: Fix several clang-tidy warnings and cleanup

This commit is contained in:
Ignacio Etcheverry
2020-07-05 19:19:36 +02:00
parent 772f693e5b
commit 2511c43972
48 changed files with 935 additions and 1205 deletions

View File

@@ -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;