mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 04:22:28 +00:00
AK+Toolchain: Make char and wchar_t behave on AARCH64
By default char and wchar_t are unsigned on AARCH64. This fixes a bunch of related compiler errors.
This commit is contained in:
parent
31bd5b1a02
commit
a650c74b27
Notes:
sideshowbarker
2024-07-17 18:49:10 +09:00
Author: https://github.com/gunnarbeutner
Commit: a650c74b27
Pull-request: https://github.com/SerenityOS/serenity/pull/15558
Reviewed-by: https://github.com/BertalanD
Reviewed-by: https://github.com/FireFox317
Reviewed-by: https://github.com/awesomekling ✅
Reviewed-by: https://github.com/linusg
4 changed files with 29 additions and 10 deletions
|
@ -270,9 +270,11 @@ public:
|
|||
return m_view.visit(
|
||||
[&](StringView view) -> u32 {
|
||||
auto ch = view[index];
|
||||
if (ch < 0)
|
||||
return 256u + ch;
|
||||
return ch;
|
||||
if constexpr (IsSigned<char>) {
|
||||
if (ch < 0)
|
||||
return 256u + ch;
|
||||
return ch;
|
||||
}
|
||||
},
|
||||
[&](Utf32View const& view) -> u32 { return view[index]; },
|
||||
[&](Utf16View const& view) -> u32 { return view.code_point_at(index); },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue