mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 19:27:35 +00:00
HexEditor: Make HexEditor::open_new_file
fallible and reduce branching
Returning a `bool` is meaningless, so let's make it more expresive :^)
This commit is contained in:
parent
035d63f528
commit
88cf40179d
3 changed files with 15 additions and 18 deletions
|
@ -33,7 +33,7 @@ public:
|
|||
virtual ~HexEditor() override = default;
|
||||
|
||||
size_t buffer_size() const { return m_document->size(); }
|
||||
bool open_new_file(size_t size);
|
||||
ErrorOr<void> open_new_file(size_t size);
|
||||
void open_file(NonnullRefPtr<Core::File> file);
|
||||
void fill_selection(u8 fill_byte);
|
||||
Optional<u8> get_byte(size_t position);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue