diff options
author | Lei Zhang <thestig@chromium.org> | 2018-10-09 21:15:17 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-09 21:15:17 +0000 |
commit | 8153561249b45ba45f6e393cc081eb1101f3f7a6 (patch) | |
tree | 142c4cd8a56aa73b2874d0f6d95777ff4a9eb4c0 /core/fpdfapi/parser | |
parent | 8c62883bdb9d695069a483133ddc96d5b85ec472 (diff) | |
download | pdfium-8153561249b45ba45f6e393cc081eb1101f3f7a6.tar.xz |
Do IWYU for cpdf_dictionary.h.
Move some method implementations out of headers in the process.
Change-Id: I8701e360d4addd9aec39fe887d932209985d2443
Reviewed-on: https://pdfium-review.googlesource.com/c/43608
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r-- | core/fpdfapi/parser/cpdf_object_walker.h | 6 | ||||
-rw-r--r-- | core/fpdfapi/parser/cpdf_stream.h | 1 | ||||
-rw-r--r-- | core/fpdfapi/parser/cpdf_stream_acc.cpp | 1 | ||||
-rw-r--r-- | core/fpdfapi/parser/cpdf_stream_acc.h | 3 | ||||
-rw-r--r-- | core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp | 2 |
5 files changed, 8 insertions, 5 deletions
diff --git a/core/fpdfapi/parser/cpdf_object_walker.h b/core/fpdfapi/parser/cpdf_object_walker.h index e0fd35de29..0af683c01c 100644 --- a/core/fpdfapi/parser/cpdf_object_walker.h +++ b/core/fpdfapi/parser/cpdf_object_walker.h @@ -8,9 +8,11 @@ #include <memory> #include <stack> -#include "core/fpdfapi/parser/cpdf_dictionary.h" +#include "core/fxcrt/fx_string.h" #include "core/fxcrt/unowned_ptr.h" +class CPDF_Object; + // Walk on all non-null sub-objects in an object in depth, include itself, // like in flat list. class CPDF_ObjectWalker { @@ -42,7 +44,7 @@ class CPDF_ObjectWalker { size_t current_depth() const { return current_depth_; } const CPDF_Object* GetParent() const { return parent_object_.Get(); } - ByteString dictionary_key() const { return dict_key_; } + const ByteString& dictionary_key() const { return dict_key_; } private: static std::unique_ptr<SubobjectIterator> MakeIterator( diff --git a/core/fpdfapi/parser/cpdf_stream.h b/core/fpdfapi/parser/cpdf_stream.h index aada80e35c..4f1eb05478 100644 --- a/core/fpdfapi/parser/cpdf_stream.h +++ b/core/fpdfapi/parser/cpdf_stream.h @@ -11,7 +11,6 @@ #include <set> #include <sstream> -#include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfapi/parser/cpdf_object.h" #include "core/fxcrt/fx_stream.h" diff --git a/core/fpdfapi/parser/cpdf_stream_acc.cpp b/core/fpdfapi/parser/cpdf_stream_acc.cpp index 7956124c62..c87e404186 100644 --- a/core/fpdfapi/parser/cpdf_stream_acc.cpp +++ b/core/fpdfapi/parser/cpdf_stream_acc.cpp @@ -8,6 +8,7 @@ #include <utility> +#include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfapi/parser/fpdf_parser_decode.h" CPDF_StreamAcc::CPDF_StreamAcc(const CPDF_Stream* pStream) diff --git a/core/fpdfapi/parser/cpdf_stream_acc.h b/core/fpdfapi/parser/cpdf_stream_acc.h index e725041e80..37e21d26d8 100644 --- a/core/fpdfapi/parser/cpdf_stream_acc.h +++ b/core/fpdfapi/parser/cpdf_stream_acc.h @@ -9,7 +9,6 @@ #include <memory> -#include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfapi/parser/cpdf_stream.h" #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" @@ -17,6 +16,8 @@ #include "core/fxcrt/retain_ptr.h" #include "third_party/base/span.h" +class CPDF_Dictionary; + class CPDF_StreamAcc final : public Retainable { public: template <typename T, typename... Args> diff --git a/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp b/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp index 1fbb342548..146bd4b77b 100644 --- a/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp +++ b/core/fpdfapi/parser/cpdf_stream_acc_unittest.cpp @@ -4,8 +4,8 @@ #include "core/fpdfapi/parser/cpdf_stream_acc.h" +#include "core/fpdfapi/parser/cpdf_dictionary.h" #include "core/fpdfapi/parser/cpdf_stream.h" - #include "core/fxcrt/cfx_memorystream.h" #include "core/fxcrt/fx_stream.h" #include "testing/gtest/include/gtest/gtest.h" |