diff options
author | Ben Wiederhake <BenWiederhake.GitHub@gmx.de> | 2021-09-17 03:08:30 +0200 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2021-09-20 17:39:36 +0430 |
commit | da170997d5754880255e2527a861aed304ed76ee (patch) | |
tree | 8489e2368da9ca6352767bac415b0e0df6294935 | |
parent | edc0cd29f8721cbfab9bf34c71777f3d5e3578f4 (diff) | |
download | serenity-da170997d5754880255e2527a861aed304ed76ee.zip |
LibPDF: Move inline function definition
This breaks the dependency cycle between Parser and Document.
-rw-r--r-- | Userland/Libraries/LibPDF/Parser.cpp | 5 | ||||
-rw-r--r-- | Userland/Libraries/LibPDF/Parser.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/Userland/Libraries/LibPDF/Parser.cpp b/Userland/Libraries/LibPDF/Parser.cpp index d553589466..3892576c4c 100644 --- a/Userland/Libraries/LibPDF/Parser.cpp +++ b/Userland/Libraries/LibPDF/Parser.cpp @@ -39,6 +39,11 @@ Parser::Parser(ReadonlyBytes const& bytes) { } +void Parser::set_document(RefPtr<Document> const& document) +{ + m_document = document; +} + bool Parser::initialize() { if (!parse_header()) diff --git a/Userland/Libraries/LibPDF/Parser.h b/Userland/Libraries/LibPDF/Parser.h index 2dba1a0515..ac8aa3ff8f 100644 --- a/Userland/Libraries/LibPDF/Parser.h +++ b/Userland/Libraries/LibPDF/Parser.h @@ -29,7 +29,7 @@ public: Parser(Badge<Document>, ReadonlyBytes const&); [[nodiscard]] ALWAYS_INLINE RefPtr<DictObject> const& trailer() const { return m_trailer; } - void set_document(RefPtr<Document> const& document) { m_document = document; } + void set_document(RefPtr<Document> const&); // Parses the header and initializes the xref table and trailer bool initialize(); |