mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
AK: Replace C-style casts
This commit is contained in:
parent
7d6908d9a5
commit
067d0689c5
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/AtkinsSJ
Commit: 067d0689c5
Pull-request: https://github.com/SerenityOS/serenity/pull/17745
Reviewed-by: https://github.com/kleinesfilmroellchen
14 changed files with 49 additions and 49 deletions
|
@ -26,13 +26,13 @@ public:
|
|||
, m_length(length)
|
||||
{
|
||||
if (!is_constant_evaluated())
|
||||
VERIFY(!Checked<uintptr_t>::addition_would_overflow((uintptr_t)characters, length));
|
||||
VERIFY(!Checked<uintptr_t>::addition_would_overflow(reinterpret_cast<uintptr_t>(characters), length));
|
||||
}
|
||||
ALWAYS_INLINE StringView(unsigned char const* characters, size_t length)
|
||||
: m_characters((char const*)characters)
|
||||
: m_characters(reinterpret_cast<char const*>(characters))
|
||||
, m_length(length)
|
||||
{
|
||||
VERIFY(!Checked<uintptr_t>::addition_would_overflow((uintptr_t)characters, length));
|
||||
VERIFY(!Checked<uintptr_t>::addition_would_overflow(reinterpret_cast<uintptr_t>(characters), length));
|
||||
}
|
||||
ALWAYS_INLINE StringView(ReadonlyBytes bytes)
|
||||
: m_characters(reinterpret_cast<char const*>(bytes.data()))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue