diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-04-06 23:48:24 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-04-06 23:48:24 +0000 |
commit | 6058efdbdc186e120e7e2121c290ac4d820ffbf8 (patch) | |
tree | 8944872de2d924d3efd76266cc929c6f25199134 /core/fxcrt/unowned_ptr.h | |
parent | 2aa01f5ccbf1464b43527c1ffa6b42bafed9ebeb (diff) | |
download | pdfium-6058efdbdc186e120e7e2121c290ac4d820ffbf8.tar.xz |
Add span.h from chromium base.chromium/3392
Allows indexing with better bounds-checking to occur. Some small
modifications are required to deal with PDFium being intentionally
held at C++11 compliance, not C++14.
Use in one place as check on correctness.
Change-Id: Id2875cf0a93980112bc536a93c4f9ec5306c0dac
Reviewed-on: https://pdfium-review.googlesource.com/29671
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Chris Palmer <palmer@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcrt/unowned_ptr.h')
-rw-r--r-- | core/fxcrt/unowned_ptr.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fxcrt/unowned_ptr.h b/core/fxcrt/unowned_ptr.h index f9753cde37..b1c9c66b3e 100644 --- a/core/fxcrt/unowned_ptr.h +++ b/core/fxcrt/unowned_ptr.h @@ -32,7 +32,8 @@ // // The array indexing operation [] is not supported on an unowned ptr, // because an unowned ptr expresses a one to one relationship with some -// other heap object. +// other heap object. Use pdfium::span<> for the cases where indexing +// into an unowned array is desired, which performs the same checks. namespace fxcrt { |