summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_syntax_parser.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-08-23 23:52:53 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-23 23:52:53 +0000
commit367ed462b51799c008795b19e886ccbed221b9be (patch)
tree3c94f25900ec5617954dbfd3e615e6a4751ddfcd /core/fpdfapi/parser/cpdf_syntax_parser.cpp
parentc1dde5d9b3da2af6e6f81df09ed41ab9c34bbde4 (diff)
downloadpdfium-367ed462b51799c008795b19e886ccbed221b9be.tar.xz
Use pdfium::span<> in CPDF_Stream::SetData().
Conversion to span makes this more elegant in a number of places, owing to std::vector directly converting to span, and the bytestring's ToRawSpan(). Disambiguate single-argument forms to allow passing {} as an argument. Change-Id: Ibd5eaadca8d8cbbd589338f375c7ee8439fd3eb2 Reviewed-on: https://pdfium-review.googlesource.com/41272 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser/cpdf_syntax_parser.cpp')
-rw-r--r--core/fpdfapi/parser/cpdf_syntax_parser.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index 89bf991cd4..65a8d78b13 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -708,8 +708,7 @@ std::unique_ptr<CPDF_Stream> CPDF_SyntaxParser::ReadStream(
pStream->InitStreamFromFile(data, std::move(pDict));
} else {
DCHECK(!len);
- // Empty stream
- pStream->InitStream(nullptr, 0, std::move(pDict));
+ pStream->InitStream({}, std::move(pDict)); // Empty stream
}
const FX_FILESIZE end_stream_offset = GetPos();
memset(m_WordBuffer, 0, kEndObjStr.GetLength() + 1);