diff --git a/Userland/Applications/HexEditor/HexEditor.cpp b/Userland/Applications/HexEditor/HexEditor.cpp index 421e584bb4..aac4524507 100644 --- a/Userland/Applications/HexEditor/HexEditor.cpp +++ b/Userland/Applications/HexEditor/HexEditor.cpp @@ -660,7 +660,7 @@ void HexEditor::paint_event(GUI::PaintEvent& event) line_height() }; - const u8 cell_value = m_document->get(byte_position).value; + u8 const cell_value = m_document->get(byte_position).value; auto line = DeprecatedString::formatted("{:02X}", cell_value); Gfx::Color background_color = palette().color(background_role()); @@ -804,7 +804,7 @@ Vector HexEditor::find_all(ByteBuffer& needle, size_t start) } } if (found) { - matches.append({ i, DeprecatedString::formatted("{}", StringView { needle }.to_deprecated_string().characters()) }); + matches.append({ i, String::formatted("{}", StringView { needle }).release_value_but_fixme_should_propagate_errors() }); i += needle.size() - 1; } } @@ -814,7 +814,7 @@ Vector HexEditor::find_all(ByteBuffer& needle, size_t start) return {}; auto first_match = matches.at(0); - highlight(first_match.offset, first_match.offset + first_match.value.length()); + highlight(first_match.offset, first_match.offset + first_match.value.bytes().size()); return matches; } @@ -839,7 +839,7 @@ Vector HexEditor::find_all_strings(size_t min_length) builder.append(c); } else { if (builder.length() >= min_length) - matches.append({ offset, builder.to_deprecated_string() }); + matches.append({ offset, builder.to_string().release_value_but_fixme_should_propagate_errors() }); builder.clear(); found_string = false; } @@ -849,7 +849,7 @@ Vector HexEditor::find_all_strings(size_t min_length) return {}; auto first_match = matches.at(0); - highlight(first_match.offset, first_match.offset + first_match.value.length()); + highlight(first_match.offset, first_match.offset + first_match.value.bytes().size()); return matches; } diff --git a/Userland/Applications/HexEditor/SearchResultsModel.h b/Userland/Applications/HexEditor/SearchResultsModel.h index 3074ff6575..afe6ccb37c 100644 --- a/Userland/Applications/HexEditor/SearchResultsModel.h +++ b/Userland/Applications/HexEditor/SearchResultsModel.h @@ -15,7 +15,7 @@ struct Match { u64 offset; - DeprecatedString value; + String value; }; class SearchResultsModel final : public GUI::Model {