summaryrefslogtreecommitdiff
path: root/core/io/ip_address.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-02-04 13:06:38 +0100
committerGitHub <noreply@github.com>2022-02-04 13:06:38 +0100
commit2e320dcf8796d77b6196ef93d4ea304bf5bcb3d4 (patch)
treec8ad853c2b28149f975b2728deac960097ae3288 /core/io/ip_address.cpp
parentd235c1bb1964b80d776a64aa2a1b198a8e52bf72 (diff)
parent244db375087440888ca5b86fd0d114a54f41489a (diff)
Merge pull request #57617 from bruvzg/char_cleanup
Diffstat (limited to 'core/io/ip_address.cpp')
-rw-r--r--core/io/ip_address.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/io/ip_address.cpp b/core/io/ip_address.cpp
index 38f99a08a4..d183c60798 100644
--- a/core/io/ip_address.cpp
+++ b/core/io/ip_address.cpp
@@ -71,7 +71,7 @@ static void _parse_hex(const String &p_string, int p_start, uint8_t *p_dst) {
int n = 0;
char32_t c = p_string[i];
- if (c >= '0' && c <= '9') {
+ if (is_digit(c)) {
n = c - '0';
} else if (c >= 'a' && c <= 'f') {
n = 10 + (c - 'a');
@@ -113,7 +113,7 @@ void IPAddress::_parse_ipv6(const String &p_string) {
} else if (c == '.') {
part_ipv4 = true;
- } else if ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')) {
+ } else if (is_hex_digit(c)) {
if (!part_found) {
parts[parts_idx++] = i;
part_found = true;