summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_extension.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-04-17 23:46:18 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-04-17 23:46:18 +0000
commit51a41ea222eeb852be4f372165d2d9bc9094b2a4 (patch)
tree3fb5a449bc07b4fb5dde81af62836d6bfdf2a48f /core/fxcrt/fx_extension.h
parent11e5882fbb03bec43956ae0ea4a2a5d9593ccb34 (diff)
downloadpdfium-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/fxcrt/fx_extension.h')
-rw-r--r--core/fxcrt/fx_extension.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fxcrt/fx_extension.h b/core/fxcrt/fx_extension.h
index 0f249f89c8..ff96de0f7c 100644
--- a/core/fxcrt/fx_extension.h
+++ b/core/fxcrt/fx_extension.h
@@ -12,6 +12,7 @@
#include <memory>
#include "core/fxcrt/fx_string.h"
+#include "third_party/base/span.h"
#include "third_party/icu/source/common/unicode/uchar.h"
#define FX_INVALID_OFFSET static_cast<uint32_t>(-1)
@@ -82,11 +83,10 @@ inline int FXSYS_DecimalCharToInt(const wchar_t c) {
}
void FXSYS_IntToTwoHexChars(uint8_t c, char* buf);
-
void FXSYS_IntToFourHexChars(uint16_t c, char* buf);
size_t FXSYS_ToUTF16BE(uint32_t unicode, char* buf);
-uint32_t GetBits32(const uint8_t* pData, int bitpos, int nbits);
+uint32_t GetBits32(pdfium::span<const uint8_t> pData, int bitpos, int nbits);
#endif // CORE_FXCRT_FX_EXTENSION_H_