diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-04-17 23:46:18 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-17 23:46:18 +0000 |
commit | 51a41ea222eeb852be4f372165d2d9bc9094b2a4 (patch) | |
tree | 3fb5a449bc07b4fb5dde81af62836d6bfdf2a48f /core/fxge | |
parent | 11e5882fbb03bec43956ae0ea4a2a5d9593ccb34 (diff) | |
download | pdfium-51a41ea222eeb852be4f372165d2d9bc9094b2a4.tar.xz |
Use span<> in GetBits32().
Get bounds checking "for free".
Change-Id: Ic60d63836f6c223e2ee1262649d47da54bb30ecc
Reviewed-on: https://pdfium-review.googlesource.com/30876
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxge')
-rw-r--r-- | core/fxge/skia/fx_skia_device.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<const uint8_t> pSampleData = pFunc->GetSampleStream()->GetSpan(); for (uint32_t i = 0; i < sampleCount; ++i) { float floatColors[3]; for (uint32_t j = 0; j < 3; ++j) { |