diff options
author | Andreas Kling <kling@serenityos.org> | 2021-11-11 01:06:34 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-11-11 01:27:46 +0100 |
commit | 80d4e830a0a95a41e3a3a6ccdc938fdfc4c7430b (patch) | |
tree | 80482418dd76af80034d5dc215db51c12ce27f67 /Userland/Libraries/LibPDF/Parser.cpp | |
parent | 8b1108e4858f797c9216dc8ae4a3918ad50c73b4 (diff) | |
download | serenity-80d4e830a0a95a41e3a3a6ccdc938fdfc4c7430b.zip |
Everywhere: Pass AK::ReadonlyBytes by value
Diffstat (limited to 'Userland/Libraries/LibPDF/Parser.cpp')
-rw-r--r-- | Userland/Libraries/LibPDF/Parser.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibPDF/Parser.cpp b/Userland/Libraries/LibPDF/Parser.cpp index a591060c47..7565f6cd18 100644 --- a/Userland/Libraries/LibPDF/Parser.cpp +++ b/Userland/Libraries/LibPDF/Parser.cpp @@ -23,18 +23,18 @@ static NonnullRefPtr<T> make_object(Args... args) requires(IsBaseOf<Object, T>) return adopt_ref(*new T(forward<Args>(args)...)); } -Vector<Command> Parser::parse_graphics_commands(ReadonlyBytes const& bytes) +Vector<Command> Parser::parse_graphics_commands(ReadonlyBytes bytes) { auto parser = adopt_ref(*new Parser(bytes)); return parser->parse_graphics_commands(); } -Parser::Parser(Badge<Document>, ReadonlyBytes const& bytes) +Parser::Parser(Badge<Document>, ReadonlyBytes bytes) : m_reader(bytes) { } -Parser::Parser(ReadonlyBytes const& bytes) +Parser::Parser(ReadonlyBytes bytes) : m_reader(bytes) { } @@ -408,7 +408,7 @@ RefPtr<DictObject> Parser::parse_file_trailer() return dict; } -Optional<Parser::PageOffsetHintTable> Parser::parse_page_offset_hint_table(ReadonlyBytes const& hint_stream_bytes) +Optional<Parser::PageOffsetHintTable> Parser::parse_page_offset_hint_table(ReadonlyBytes hint_stream_bytes) { if (hint_stream_bytes.size() < sizeof(PageOffsetHintTable)) return {}; @@ -456,7 +456,7 @@ Optional<Parser::PageOffsetHintTable> Parser::parse_page_offset_hint_table(Reado return hint_table; } -Optional<Vector<Parser::PageOffsetHintTableEntry>> Parser::parse_all_page_offset_hint_table_entries(PageOffsetHintTable const& hint_table, ReadonlyBytes const& hint_stream_bytes) +Optional<Vector<Parser::PageOffsetHintTableEntry>> Parser::parse_all_page_offset_hint_table_entries(PageOffsetHintTable const& hint_table, ReadonlyBytes hint_stream_bytes) { InputMemoryStream input_stream(hint_stream_bytes); input_stream.seek(sizeof(PageOffsetHintTable)); |