From 11884e4759d100fa1f668b3b61de748b9e11f260 Mon Sep 17 00:00:00 2001 From: MarkS Date: Mon, 14 Nov 2022 12:42:10 -0700 Subject: [PATCH] graphite2: remove deprecated std::iterator Change-Id: I786a29a597ada820629a9a045b548bffd1df6a0c --- Lib/src/graphite2/src/GlyphCache.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Lib/src/graphite2/src/GlyphCache.cpp b/Lib/src/graphite2/src/GlyphCache.cpp index d1e2b48fbd..d80260cff4 100644 --- a/Lib/src/graphite2/src/GlyphCache.cpp +++ b/Lib/src/graphite2/src/GlyphCache.cpp @@ -44,12 +44,18 @@ namespace // variable length structures. template - class _glat_iterator : public std::iterator > + class _glat_iterator { unsigned short key() const { return be::peek(_e) + _n; } unsigned int run() const { return be::peek(_e+sizeof(W)); } void advance_entry() { _n = 0; _e = _v; be::skip(_v,2); } public: + using iterator_category = std::input_iterator_tag; + using value_type = std::pair; + using difference_type = ptrdiff_t; + using pointer = value_type *; + using reference = value_type &; + _glat_iterator(const void * glat=0) : _e(reinterpret_cast(glat)), _v(_e+2*sizeof(W)), _n(0) {} _glat_iterator & operator ++ () {