summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2018-08-13 23:19:29 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-13 23:19:29 +0000
commited176992eb7ddbb0fee7b79625501df06f8ccf93 (patch)
treeab5493b058e80da342648fda8b0cc8a8ba6cab94 /fpdfsdk
parentf0260b2cccb9e6c59413a20040dccf5551fb6882 (diff)
downloadpdfium-ed176992eb7ddbb0fee7b79625501df06f8ccf93.tar.xz
Make CFX_ReadOnlyMemoryStream take a span.
Change-Id: Id097320ab2d9b5d1579582e5797e29c701499501 Reviewed-on: https://pdfium-review.googlesource.com/39991 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_view.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp
index bd8cfe1e25..0cfa362904 100644
--- a/fpdfsdk/fpdf_view.cpp
+++ b/fpdfsdk/fpdf_view.cpp
@@ -41,6 +41,7 @@
#include "fxjs/ijs_runtime.h"
#include "public/fpdf_formfill.h"
#include "third_party/base/ptr_util.h"
+#include "third_party/base/span.h"
#ifdef PDF_ENABLE_XFA
#include "fpdfsdk/fpdfxfa/cpdfxfa_context.h"
@@ -269,9 +270,10 @@ FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_LoadXFA(FPDF_DOCUMENT document) {
FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV
FPDF_LoadMemDocument(const void* data_buf, int size, FPDF_BYTESTRING password) {
- return LoadDocumentImpl(pdfium::MakeRetain<CFX_ReadOnlyMemoryStream>(
- static_cast<const uint8_t*>(data_buf), size),
- password);
+ return LoadDocumentImpl(
+ pdfium::MakeRetain<CFX_ReadOnlyMemoryStream>(
+ pdfium::make_span(static_cast<const uint8_t*>(data_buf), size)),
+ password);
}
FPDF_EXPORT FPDF_DOCUMENT FPDF_CALLCONV