diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-23 23:52:53 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-23 23:52:53 +0000 |
commit | 367ed462b51799c008795b19e886ccbed221b9be (patch) | |
tree | 3c94f25900ec5617954dbfd3e615e6a4751ddfcd /core/fxcrt | |
parent | c1dde5d9b3da2af6e6f81df09ed41ab9c34bbde4 (diff) | |
download | pdfium-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/fxcrt')
-rw-r--r-- | core/fxcrt/cfx_seekablemultistream_unittest.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fxcrt/cfx_seekablemultistream_unittest.cpp b/core/fxcrt/cfx_seekablemultistream_unittest.cpp index 89be1bd180..8d459e8862 100644 --- a/core/fxcrt/cfx_seekablemultistream_unittest.cpp +++ b/core/fxcrt/cfx_seekablemultistream_unittest.cpp @@ -43,11 +43,11 @@ TEST(CXFAFileReadTest, NormalStreams) { auto stream3 = pdfium::MakeUnique<CPDF_Stream>(); // 16 chars total. - stream1->InitStream(reinterpret_cast<const uint8_t*>("one t"), 5, + stream1->InitStream(ByteStringView("one t").span(), pdfium::MakeUnique<CPDF_Dictionary>()); - stream2->InitStream(reinterpret_cast<const uint8_t*>("wo "), 3, + stream2->InitStream(ByteStringView("wo ").span(), pdfium::MakeUnique<CPDF_Dictionary>()); - stream3->InitStream(reinterpret_cast<const uint8_t*>("three!!!"), 8, + stream3->InitStream(ByteStringView("three!!!").span(), pdfium::MakeUnique<CPDF_Dictionary>()); streams.push_back(stream1.get()); |