From 367ed462b51799c008795b19e886ccbed221b9be Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 23 Aug 2018 23:52:53 +0000 Subject: 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 Commit-Queue: Tom Sepez --- core/fxcrt/cfx_seekablemultistream_unittest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fxcrt/cfx_seekablemultistream_unittest.cpp') 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(); // 16 chars total. - stream1->InitStream(reinterpret_cast("one t"), 5, + stream1->InitStream(ByteStringView("one t").span(), pdfium::MakeUnique()); - stream2->InitStream(reinterpret_cast("wo "), 3, + stream2->InitStream(ByteStringView("wo ").span(), pdfium::MakeUnique()); - stream3->InitStream(reinterpret_cast("three!!!"), 8, + stream3->InitStream(ByteStringView("three!!!").span(), pdfium::MakeUnique()); streams.push_back(stream1.get()); -- cgit v1.2.3