commit | 7b9fa8a5e30efa2ca528bb71118918d7c5ba351b | [log] [tgz] |
---|---|---|
author | Lei Zhang <thestig@chromium.org> | Fri Jan 19 06:13:23 2024 +0000 |
committer | Pdfium LUCI CQ <pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jan 19 06:13:23 2024 +0000 |
tree | 25373d5647e89c4d423d6887f143547eaed12986 | |
parent | 75e77041a822f7ac7e73fb94b24e8c7771ff7f36 [diff] |
Simplify IsObjectStream() inside cpdf_object_stream.cpp Change the IsObjectStream() signature to take a CPDF_Stream*, since that is what all the callers pass in. Then IsObjectStream() does not need to verify if the input is a CPDF_Stream. Change-Id: I6039c3fa0dcf0263bc705e9967775fb2a6fefb20 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/115612 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fpdfapi/parser/cpdf_object_stream.cpp b/core/fpdfapi/parser/cpdf_object_stream.cpp index 19294da..16dc92c 100644 --- a/core/fpdfapi/parser/cpdf_object_stream.cpp +++ b/core/fpdfapi/parser/cpdf_object_stream.cpp
@@ -21,8 +21,7 @@ namespace { -bool IsObjectStream(const CPDF_Object* object) { - const CPDF_Stream* stream = ToStream(object); +bool IsObjectStream(const CPDF_Stream* stream) { if (!stream) return false;