From 244db375087440888ca5b86fd0d114a54f41489a Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Fri, 4 Feb 2022 10:32:20 +0200 Subject: Cleanup and move char functions to the `char_utils.h` header. --- core/io/pck_packer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/io/pck_packer.cpp') diff --git a/core/io/pck_packer.cpp b/core/io/pck_packer.cpp index 221a680130..272ace3438 100644 --- a/core/io/pck_packer.cpp +++ b/core/io/pck_packer.cpp @@ -62,7 +62,7 @@ Error PCKPacker::pck_start(const String &p_file, int p_alignment, const String & int v = 0; if (i * 2 < _key.length()) { char32_t ct = _key[i * 2]; - if (ct >= '0' && ct <= '9') { + if (is_digit(ct)) { ct = ct - '0'; } else if (ct >= 'a' && ct <= 'f') { ct = 10 + ct - 'a'; @@ -72,7 +72,7 @@ Error PCKPacker::pck_start(const String &p_file, int p_alignment, const String & if (i * 2 + 1 < _key.length()) { char32_t ct = _key[i * 2 + 1]; - if (ct >= '0' && ct <= '9') { + if (is_digit(ct)) { ct = ct - '0'; } else if (ct >= 'a' && ct <= 'f') { ct = 10 + ct - 'a'; -- cgit v1.2.3