HexEditor: Create a function to initialize a HexDocumentFile

This function is made from what composed `set_file()` (which now calls
the new function). It allows to create a `HexDocumentFile` without
calling the hackish `set_file(move(m_file))`.
This commit is contained in:
Lucas CHOLLET 2023-01-14 22:42:05 -05:00 committed by Andrew Kaster
commit 3f932081ae
Notes: sideshowbarker 2024-07-17 06:00:02 +09:00
2 changed files with 8 additions and 2 deletions

View file

@ -76,6 +76,8 @@ public:
private:
explicit HexDocumentFile(NonnullOwnPtr<Core::Stream::File> file);
ErrorOr<void> initialize_internal_state();
void ensure_position_in_buffer(size_t position);
NonnullOwnPtr<Core::Stream::File> m_file;