summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_fontglobals.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-26 17:20:28 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-26 17:20:28 +0000
commit785da23f6cce8004b8e7759345abd877dab953ea (patch)
treea1f15eb6e7c9b32c08803f775c01dd5e3225c206 /core/fpdfapi/font/cpdf_fontglobals.h
parente529390fd5b521e4c223343a4b367b0ced357ed5 (diff)
downloadpdfium-785da23f6cce8004b8e7759345abd877dab953ea.tar.xz
Use pdfium::span in CPDF_CID2UnicodeMap.
Change-Id: Ie63f622674d9085fa45642c15e7ee8b22ca98555 Reviewed-on: https://pdfium-review.googlesource.com/36130 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_fontglobals.h')
-rw-r--r--core/fpdfapi/font/cpdf_fontglobals.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/fpdfapi/font/cpdf_fontglobals.h b/core/fpdfapi/font/cpdf_fontglobals.h
index a47dfa13d0..2663490925 100644
--- a/core/fpdfapi/font/cpdf_fontglobals.h
+++ b/core/fpdfapi/font/cpdf_fontglobals.h
@@ -14,6 +14,7 @@
#include "core/fpdfapi/cmaps/cmap_int.h"
#include "core/fpdfapi/font/cfx_stockfontarray.h"
#include "core/fpdfapi/font/cpdf_cmapmanager.h"
+#include "third_party/base/span.h"
class CPDF_FontGlobals {
public:
@@ -40,9 +41,9 @@ class CPDF_FontGlobals {
m_EmbeddedToUnicodes[idx].m_pMap = map;
m_EmbeddedToUnicodes[idx].m_Count = count;
}
- std::pair<uint32_t, const uint16_t*> GetEmbeddedToUnicode(size_t idx) {
- return {m_EmbeddedToUnicodes[idx].m_Count,
- m_EmbeddedToUnicodes[idx].m_pMap};
+ pdfium::span<const uint16_t> GetEmbeddedToUnicode(size_t idx) {
+ return pdfium::make_span(m_EmbeddedToUnicodes[idx].m_pMap,
+ m_EmbeddedToUnicodes[idx].m_Count);
}
CPDF_CMapManager* GetCMapManager() { return &m_CMapManager; }