mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:47:35 +00:00
Font: Clean up AK::MappedFile and use it for mapping font files.
This commit is contained in:
parent
ab6bd3872b
commit
3dc3754cde
5 changed files with 48 additions and 37 deletions
|
@ -7,11 +7,14 @@ namespace AK {
|
|||
class MappedFile {
|
||||
public:
|
||||
MappedFile() { }
|
||||
explicit MappedFile(String&& file_name);
|
||||
explicit MappedFile(const String& file_name);
|
||||
MappedFile(MappedFile&&);
|
||||
~MappedFile();
|
||||
|
||||
MappedFile& operator=(MappedFile&&);
|
||||
|
||||
bool is_valid() const { return m_map != (void*)-1; }
|
||||
void unmap();
|
||||
|
||||
void* pointer() { return m_map; }
|
||||
const void* pointer() const { return m_map; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue