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.
This commit is contained in:
parent
6b389ddc36
commit
365f27ab5b
|
@ -403,6 +403,8 @@ struct CoverageFormat1
|
||||||
glyphs->add (glyphArray[i]);
|
glyphs->add (glyphArray[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
/* Older compilers need this to be public. */
|
||||||
struct Iter {
|
struct Iter {
|
||||||
inline void init (const struct CoverageFormat1 &c_) { c = &c_; i = 0; };
|
inline void init (const struct CoverageFormat1 &c_) { c = &c_; i = 0; };
|
||||||
inline bool more (void) { return i < c->glyphArray.len; }
|
inline bool more (void) { return i < c->glyphArray.len; }
|
||||||
|
@ -414,6 +416,7 @@ struct CoverageFormat1
|
||||||
const struct CoverageFormat1 *c;
|
const struct CoverageFormat1 *c;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
};
|
};
|
||||||
|
private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
USHORT coverageFormat; /* Format identifier--format = 1 */
|
USHORT coverageFormat; /* Format identifier--format = 1 */
|
||||||
|
@ -497,6 +500,8 @@ struct CoverageFormat2
|
||||||
rangeRecord[i].add_coverage (glyphs);
|
rangeRecord[i].add_coverage (glyphs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public:
|
||||||
|
/* Older compilers need this to be public. */
|
||||||
struct Iter {
|
struct Iter {
|
||||||
inline void init (const CoverageFormat2 &c_) {
|
inline void init (const CoverageFormat2 &c_) {
|
||||||
c = &c_;
|
c = &c_;
|
||||||
|
@ -522,6 +527,7 @@ struct CoverageFormat2
|
||||||
const struct CoverageFormat2 *c;
|
const struct CoverageFormat2 *c;
|
||||||
unsigned int i, j, coverage;
|
unsigned int i, j, coverage;
|
||||||
};
|
};
|
||||||
|
private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
USHORT coverageFormat; /* Format identifier--format = 2 */
|
USHORT coverageFormat; /* Format identifier--format = 2 */
|
||||||
|
|
Loading…
Reference in New Issue