mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Cleanup and move char functions to the char_utils.h header.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user