diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2012-11-12 11:16:57 -0800 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2012-11-12 11:16:57 -0800 |
commit | 365f27ab5ba025bf1be6a882ed213c695cbfed7e (patch) | |
tree | f0ecf84ffa30bb3080a79a5cdd5830b88ee32b2d | |
parent | 6b389ddc3623d042ded4731f4d62dc354002fdd0 (diff) |
Work around older compilers
As reported on the list:
I am seeing a similar problem building harfbuzz 0.9.5 with Apple gcc
4.0.1 on OS X 10.5 Leopard:
hb-ot-layout-common-private.hh:406: error: 'struct
OT::CoverageFormat1::Iter' is private
hb-ot-layout-common-private.hh:646: error: within this context
hb-ot-layout-common-private.hh:500: error: 'struct
OT::CoverageFormat2::Iter' is private
hb-ot-layout-common-private.hh:647: error: within this context
make[4]: *** [libharfbuzz_la-hb-ot-layout.lo] Error 1
Also reported as happening with MSVC 2005.
-rw-r--r-- | src/hb-ot-layout-common-private.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index f5a067ae..bfb3bdbf 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -403,6 +403,8 @@ struct CoverageFormat1 glyphs->add (glyphArray[i]); } + public: + /* Older compilers need this to be public. */ struct Iter { inline void init (const struct CoverageFormat1 &c_) { c = &c_; i = 0; }; inline bool more (void) { return i < c->glyphArray.len; } @@ -414,6 +416,7 @@ struct CoverageFormat1 const struct CoverageFormat1 *c; unsigned int i; }; + private: protected: USHORT coverageFormat; /* Format identifier--format = 1 */ @@ -497,6 +500,8 @@ struct CoverageFormat2 rangeRecord[i].add_coverage (glyphs); } + public: + /* Older compilers need this to be public. */ struct Iter { inline void init (const CoverageFormat2 &c_) { c = &c_; @@ -522,6 +527,7 @@ struct CoverageFormat2 const struct CoverageFormat2 *c; unsigned int i, j, coverage; }; + private: protected: USHORT coverageFormat; /* Format identifier--format = 2 */ |