From 51a41ea222eeb852be4f372165d2d9bc9094b2a4 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 17 Apr 2018 23:46:18 +0000 Subject: Use span<> in GetBits32(). Get bounds checking "for free". Change-Id: Ic60d63836f6c223e2ee1262649d47da54bb30ecc Reviewed-on: https://pdfium-review.googlesource.com/30876 Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- core/fxge/skia/fx_skia_device.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/fxge') diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index 598dc480c2..6dd19eaed9 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -406,7 +406,7 @@ bool AddSamples(const CPDF_SampledFunc* pFunc, colorsMin[i] = pFunc->GetRange(i * 2); colorsMax[i] = pFunc->GetRange(i * 2 + 1); } - const uint8_t* pSampleData = pFunc->GetSampleStream()->GetData(); + pdfium::span pSampleData = pFunc->GetSampleStream()->GetSpan(); for (uint32_t i = 0; i < sampleCount; ++i) { float floatColors[3]; for (uint32_t j = 0; j < 3; ++j) { -- cgit v1.2.3