summaryrefslogtreecommitdiff
path: root/core/ustring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/ustring.cpp')
-rw-r--r--core/ustring.cpp7
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')