summaryrefslogtreecommitdiff
path: root/Userland/Applications/HexEditor/HexEditor.h
diff options
context:
space:
mode:
authorJames Puleo <james@jame.xyz>2022-07-28 03:34:15 -0400
committerTim Flynn <trflynn89@pm.me>2022-08-03 10:12:11 -0400
commit88cf40179dc8f6e977b838bc046f53155d38b9e4 (patch)
tree88bfb742cf2002b6d01b6a34062d7ac841003583 /Userland/Applications/HexEditor/HexEditor.h
parent035d63f5280c9ecc5241770841ccc782991922c2 (diff)
downloadserenity-88cf40179dc8f6e977b838bc046f53155d38b9e4.zip
HexEditor: Make `HexEditor::open_new_file` fallible and reduce branching
Returning a `bool` is meaningless, so let's make it more expresive :^)
Diffstat (limited to 'Userland/Applications/HexEditor/HexEditor.h')
-rw-r--r--Userland/Applications/HexEditor/HexEditor.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Applications/HexEditor/HexEditor.h b/Userland/Applications/HexEditor/HexEditor.h
index 233a251e73..aafef92d00 100644
--- a/Userland/Applications/HexEditor/HexEditor.h
+++ b/Userland/Applications/HexEditor/HexEditor.h
@@ -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);