1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 13:25:07 +00:00

ByteBuffer: Remove pointer() in favor of data()

We had two ways to get the data inside a ByteBuffer. That was silly.
This commit is contained in:
Andreas Kling 2019-09-30 08:57:01 +02:00
parent dd696e7c75
commit 8f45a259fc
30 changed files with 89 additions and 92 deletions

View file

@ -134,7 +134,7 @@ RefPtr<Font> Font::load_from_file(const StringView& path)
if (!mapped_file.is_valid())
return nullptr;
auto font = load_from_memory((const u8*)mapped_file.pointer());
auto font = load_from_memory((const u8*)mapped_file.data());
font->m_mapped_file = move(mapped_file);
return font;
}
@ -166,7 +166,7 @@ bool Font::write_to_file(const StringView& path)
stream << ByteBuffer::wrap(m_glyph_widths, 256);
ASSERT(stream.at_end());
ssize_t nwritten = write(fd, buffer.pointer(), buffer.size());
ssize_t nwritten = write(fd, buffer.data(), buffer.size());
ASSERT(nwritten == (ssize_t)buffer.size());
int rc = close(fd);
ASSERT(rc == 0);