diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2019-06-27 01:05:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 01:05:18 +0200 |
commit | eaaff9da3178fa515a0f051fda932c1dd04d53db (patch) | |
tree | 56173535c376e0324f89baccf4bc14b2580ead23 /core/ustring.cpp | |
parent | d8c96461183f0dc3208c3d624674fa4544212ea5 (diff) | |
parent | 4e5310cc60dc17e5ef09e57115ca8236544679e4 (diff) | |
download | redot-engine-eaaff9da3178fa515a0f051fda932c1dd04d53db.tar.gz |
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
Diffstat (limited to 'core/ustring.cpp')
-rw-r--r-- | core/ustring.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 686aa6f8e3..ff28fa420d 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3799,11 +3799,7 @@ bool String::is_valid_filename() const { return false; } - if (find(":") != -1 || find("/") != -1 || find("\\") != -1 || find("?") != -1 || find("*") != -1 || find("\"") != -1 || find("|") != -1 || find("%") != -1 || find("<") != -1 || find(">") != -1) { - return false; - } else { - return true; - } + return !(find(":") != -1 || find("/") != -1 || find("\\") != -1 || find("?") != -1 || find("*") != -1 || find("\"") != -1 || find("|") != -1 || find("%") != -1 || find("<") != -1 || find(">") != -1); } bool String::is_valid_ip_address() const { @@ -3941,7 +3937,6 @@ String String::percent_decode() const { uint8_t a = LOWERCASE(cs[i + 1]); uint8_t b = LOWERCASE(cs[i + 2]); - c = 0; if (a >= '0' && a <= '9') c = (a - '0') << 4; else if (a >= 'a' && a <= 'f') |