Comments (4)
I was able to update GlyphCache.cpp, and graphite now compiles in Electron v20. Here is a patch:
diff --git a/src/GlyphCache.cpp b/src/GlyphCache.cpp
index 282bdc18..336de3f1 100644
--- a/src/GlyphCache.cpp
+++ b/src/GlyphCache.cpp
@@ -44,12 +44,18 @@ namespace
// variable length structures.
template<typename W>
- class _glat_iterator : public std::iterator<std::input_iterator_tag, std::pair<sparse::key_type, sparse::mapped_type> >
+ class _glat_iterator
{
unsigned short key() const { return uint16(be::peek<W>(_e) + _n); }
unsigned int run() const { return be::peek<W>(_e+sizeof(W)); }
void advance_entry() { _n = 0; _e = _v; be::skip<W>(_v,2); }
public:
+ using iterator_category = std::input_iterator_tag;
+ using value_type = std::pair<sparse::key_type, sparse::mapped_type>;
+ using difference_type = std::pair<sparse::key_type, sparse::mapped_type>;
+ using pointer = std::pair<sparse::key_type, sparse::mapped_type>*;
+ using reference = std::pair<sparse::key_type, sparse::mapped_type>&;
+
_glat_iterator(const void * glat=0) : _e(reinterpret_cast<const byte *>(glat)), _v(_e+2*sizeof(W)), _n(0) {}
_glat_iterator<W> & operator ++ () {
from graphite.
I was getting this error when compiling Graphite2 in FieldWorks with more recent Linux libraries / gcc. Thanks @PhotoNomad0 !
from graphite.
Your example gives me more confidence about implementing what I saw at https://www.fluentcpp.com/2018/05/08/std-iterator-deprecated/ .
from graphite.
Your example gives me more confidence about implementing what I saw at https://www.fluentcpp.com/2018/05/08/std-iterator-deprecated/ .
Glad it helped you!
from graphite.
Related Issues (20)
- Tamil font features not working on LibO 6 (working on LibO 5) HOT 1
- What MPL license version? HOT 1
- fix to build with Intel compiler HOT 1
- Better integration with HarfBuzz font functions HOT 1
- Partial graphite support
- Linking of libraries is inconsistent on Linux vs BSD HOT 2
- Positioning a non-base should position the whole cluster
- set_property could not find CACHE variable CMAKE_BUILD_TYPE. HOT 1
- Graphite fails to build on Darwin with M1 processor HOT 3
- Cmake versions and deprecation warnings HOT 1
- Remove the workaround for llvm.39241?
- Deprecation warnings when building with VS 2019 with `/std:c++17` HOT 1
- Graphite Fails to Compile in recent Electronite version 22 - arithmetic between different enumeration types ('status_t' and 'graphite2::errors') is deprecated
- jsontestOutput newline issue
- padauk3Output test failure
- Access denied when opening the docs HOT 3
- Remove unnecessary null pointer checks
- Don't override `GR2_API` macro if user defined it
- cross build failed, use mips-linux-gnu-gcc
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphite.