mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 03:35:09 +00:00
AK: Make MappedFile heap-allocated and ref-counted
Let's adapt this class a bit better to how it's actually being used. Instead of having valid/invalid states and storing an error in case it's invalid, a MappedFile is now always valid, and the factory function that creates it will return an OSError if mapping fails.
This commit is contained in:
parent
70fce5c4c7
commit
2f3b901f7f
36 changed files with 184 additions and 199 deletions
|
@ -128,7 +128,7 @@ private:
|
|||
|
||||
unsigned* m_rows { nullptr };
|
||||
u8* m_glyph_widths { nullptr };
|
||||
MappedFile m_mapped_file;
|
||||
RefPtr<MappedFile> m_mapped_file;
|
||||
|
||||
u8 m_glyph_width { 0 };
|
||||
u8 m_glyph_height { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue