mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 00:50:22 +00:00
AK: Use size_t for ByteBuffer offsets
These should be unsigned values. An east-const conversion was also performed by clang-format 15.
This commit is contained in:
parent
6490529ef7
commit
6d15cbd411
Notes:
sideshowbarker
2024-07-17 04:54:26 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/6d15cbd411 Pull-request: https://github.com/SerenityOS/serenity/pull/15865
1 changed files with 4 additions and 4 deletions
|
@ -126,10 +126,10 @@ public:
|
|||
[[nodiscard]] ReadonlyBytes bytes() const { return { data(), size() }; }
|
||||
|
||||
[[nodiscard]] AK::Span<u8> span() { return { data(), size() }; }
|
||||
[[nodiscard]] AK::Span<const u8> span() const { return { data(), size() }; }
|
||||
[[nodiscard]] AK::Span<u8 const> span() const { return { data(), size() }; }
|
||||
|
||||
[[nodiscard]] u8* offset_pointer(int offset) { return data() + offset; }
|
||||
[[nodiscard]] u8 const* offset_pointer(int offset) const { return data() + offset; }
|
||||
[[nodiscard]] u8* offset_pointer(size_t offset) { return data() + offset; }
|
||||
[[nodiscard]] u8 const* offset_pointer(size_t offset) const { return data() + offset; }
|
||||
|
||||
[[nodiscard]] void* end_pointer() { return data() + m_size; }
|
||||
[[nodiscard]] void const* end_pointer() const { return data() + m_size; }
|
||||
|
@ -226,7 +226,7 @@ public:
|
|||
if (data_size == 0)
|
||||
return {};
|
||||
VERIFY(data != nullptr);
|
||||
int old_size = size();
|
||||
auto old_size = size();
|
||||
TRY(try_resize(size() + data_size));
|
||||
__builtin_memcpy(this->data() + old_size, data, data_size);
|
||||
return {};
|
||||
|
|
Loading…
Reference in a new issue