diff options
| author | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-07-07 14:59:20 +0200 |
|---|---|---|
| committer | Amlal EL Mahrouss <amlalelmahrouss@icloud.com> | 2024-07-07 14:59:20 +0200 |
| commit | eda81576c1241727085c2f62135cdf5dc118a1d0 (patch) | |
| tree | 419e32ac03b5dfbd5e5f91ca04b44852504808c6 /Kernel | |
| parent | f7ca4eff84fa67283f0e0ac1e107e4bd6f569ca0 (diff) | |
MHR-36: use Char type instead of builtin char.
Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Kernel')
| -rw-r--r-- | Kernel/CFKit/URL.hpp | 4 | ||||
| -rw-r--r-- | Kernel/Sources/URL.cxx | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/Kernel/CFKit/URL.hpp b/Kernel/CFKit/URL.hpp index 049e1194..69ab5b4b 100644 --- a/Kernel/CFKit/URL.hpp +++ b/Kernel/CFKit/URL.hpp @@ -26,8 +26,8 @@ namespace Kernel Ref<StringView> fUrlView; }; - ErrorOr<StringView> url_extract_location(const char* url); - ErrorOr<StringView> url_extract_protocol(const char* url); + ErrorOr<StringView> url_extract_location(const Char* url); + ErrorOr<StringView> url_extract_protocol(const Char* url); } // namespace Kernel #endif /* ifndef _INC_URL_HPP_ */ diff --git a/Kernel/Sources/URL.cxx b/Kernel/Sources/URL.cxx index 8d31da7c..09935370 100644 --- a/Kernel/Sources/URL.cxx +++ b/Kernel/Sources/URL.cxx @@ -20,7 +20,7 @@ namespace Kernel URL::~URL() = default; /// @brief internal and reserved protocols by kernel. - constexpr const char* kURLProtocols[] = { + constexpr const Char* kURLProtocols[] = { "file", // Filesystem protocol "mup", // Mahrouss update protocol "param", // Mahrouss parameter protocol. @@ -30,7 +30,7 @@ namespace Kernel constexpr const int kProtosCount = 3; constexpr const int kRangeSz = 4096; - ErrorOr<StringView> url_extract_location(const char* url) + ErrorOr<StringView> url_extract_location(const Char* url) { if (!url || *url == 0 || rt_string_len(url, kRangeSz) > kRangeSz) return ErrorOr<StringView>{-1}; @@ -62,7 +62,7 @@ namespace Kernel return ErrorOr<StringView>(view); } - ErrorOr<StringView> url_extract_protocol(const char* url) + ErrorOr<StringView> url_extract_protocol(const Char* url) { if (!url || *url == 0 || rt_string_len(url, kRangeSz) > kRangeSz) return ErrorOr<StringView>{-1}; @@ -74,7 +74,7 @@ namespace Kernel Ref<ErrorOr<StringView>> URL::Location() noexcept { - const char* src = fUrlView.Leak().CData(); + const Char* src = fUrlView.Leak().CData(); auto loc = url_extract_location(src); if (!loc) @@ -85,7 +85,7 @@ namespace Kernel Ref<ErrorOr<StringView>> URL::Protocol() noexcept { - const char* src = fUrlView.Leak().CData(); + const Char* src = fUrlView.Leak().CData(); auto loc = url_extract_protocol(src); if (!loc) |
