mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-11 17:00:37 +00:00
HexEditor: Rename camel case variable names in HexEditor::save_as
This also changes those variables to be references to the casted document type, instead of pointers.
This commit is contained in:
parent
88cf40179d
commit
8c11786145
Notes:
sideshowbarker
2024-07-17 08:27:30 +09:00
Author: https://github.com/drunderscore Commit: https://github.com/SerenityOS/serenity/commit/8c11786145 Pull-request: https://github.com/SerenityOS/serenity/pull/14721
1 changed files with 5 additions and 5 deletions
|
@ -116,13 +116,13 @@ void HexEditor::set_selection(size_t position, size_t length)
|
|||
bool HexEditor::save_as(NonnullRefPtr<Core::File> new_file)
|
||||
{
|
||||
if (m_document->type() == HexDocument::Type::File) {
|
||||
HexDocumentFile* fileDocument = static_cast<HexDocumentFile*>(m_document.ptr());
|
||||
if (!fileDocument->write_to_file(new_file))
|
||||
auto& file_document = static_cast<HexDocumentFile&>(*m_document);
|
||||
if (!file_document.write_to_file(new_file))
|
||||
return false;
|
||||
fileDocument->set_file(new_file);
|
||||
file_document.set_file(new_file);
|
||||
} else {
|
||||
HexDocumentMemory* memoryDocument = static_cast<HexDocumentMemory*>(m_document.ptr());
|
||||
if (!memoryDocument->write_to_file(new_file))
|
||||
auto& memory_document = static_cast<HexDocumentMemory&>(*m_document);
|
||||
if (!memory_document.write_to_file(new_file))
|
||||
return false;
|
||||
m_document = make<HexDocumentFile>(new_file);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue