summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit/cpdf_flateencoder.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-05-16 17:07:02 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-16 17:07:02 +0000
commit6facd15a7ecfbae24f2c356fa3b358288120a6f2 (patch)
tree414690887496c657e1147fd6e1342dd1bee7ba53 /core/fpdfapi/edit/cpdf_flateencoder.h
parentfc0bbda00d476ba0c0b43dd88fd1d1a1d11577cc (diff)
downloadpdfium-6facd15a7ecfbae24f2c356fa3b358288120a6f2.tar.xz
Use pdfium::span<> in cpdf_creator.
Change-Id: I959fe5dc30fcfe2176c7e5a64b07d082313a22b4 Reviewed-on: https://pdfium-review.googlesource.com/32595 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit/cpdf_flateencoder.h')
-rw-r--r--core/fpdfapi/edit/cpdf_flateencoder.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/fpdfapi/edit/cpdf_flateencoder.h b/core/fpdfapi/edit/cpdf_flateencoder.h
index b69b54d93b..05633f6814 100644
--- a/core/fpdfapi/edit/cpdf_flateencoder.h
+++ b/core/fpdfapi/edit/cpdf_flateencoder.h
@@ -14,6 +14,7 @@
#include "core/fxcrt/fx_memory.h"
#include "core/fxcrt/maybe_owned.h"
#include "core/fxcrt/retain_ptr.h"
+#include "third_party/base/span.h"
class CPDF_Stream;
@@ -28,8 +29,9 @@ class CPDF_FlateEncoder {
// Returns |m_pClonedDict| if it is valid. Otherwise returns |m_pDict|.
const CPDF_Dictionary* GetDict() const;
- uint32_t GetSize() const { return m_dwSize; }
- const uint8_t* GetData() const { return m_pData.Get(); }
+ pdfium::span<const uint8_t> GetSpan() const {
+ return pdfium::make_span(m_pData.Get(), m_dwSize);
+ }
private:
uint32_t m_dwSize;