mirror of
https://github.com/RGBCube/serenity
synced 2025-07-05 13:37:35 +00:00
AK: Make ByteBuffer's copy() and wrap() take void*.
This way we don't have to cast whatever we're passing to copy()/wrap().
This commit is contained in:
parent
5b0cbf547d
commit
1c6dfc3282
4 changed files with 11 additions and 11 deletions
|
@ -163,9 +163,9 @@ bool Font::write_to_file(const String& path)
|
|||
auto buffer = ByteBuffer::create_uninitialized(sizeof(FontFileHeader) + (256 * bytes_per_glyph) + 256);
|
||||
BufferStream stream(buffer);
|
||||
|
||||
stream << ByteBuffer::wrap((byte*)&header, sizeof(FontFileHeader));
|
||||
stream << ByteBuffer::wrap((byte*)m_rows, (256 * bytes_per_glyph));
|
||||
stream << ByteBuffer::wrap((byte*)m_glyph_widths, 256);
|
||||
stream << ByteBuffer::wrap(&header, sizeof(FontFileHeader));
|
||||
stream << ByteBuffer::wrap(m_rows, (256 * bytes_per_glyph));
|
||||
stream << ByteBuffer::wrap(m_glyph_widths, 256);
|
||||
|
||||
ASSERT(stream.at_end());
|
||||
ssize_t nwritten = write(fd, buffer.pointer(), buffer.size());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue