Made Glyph() const
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/include/FTGlyphContainer.h b/include/FTGlyphContainer.h
index 034bd70..3eeba93 100755
--- a/include/FTGlyphContainer.h
+++ b/include/FTGlyphContainer.h
@@ -49,7 +49,7 @@ class FTGL_EXPORT FTGlyphContainer
* @return An FTGlyph or <code>null</code> is it hasn't been
* loaded.
*/
- FTGlyph* Glyph( const unsigned int c) const;
+ const FTGlyph* const Glyph( const unsigned int c) const;
FTBBox BBox( const unsigned int index) const;
diff --git a/src/FTGlyphContainer.cpp b/src/FTGlyphContainer.cpp
index 2cfb445..91cca28 100755
--- a/src/FTGlyphContainer.cpp
+++ b/src/FTGlyphContainer.cpp
@@ -4,8 +4,8 @@
FTGlyphContainer::FTGlyphContainer( FTFace* f)
-: face( f),
- err( 0)
+: face(f),
+ err(0)
{
numberOfGlyphs = face->GlyphCount();
glyphs.resize( numberOfGlyphs, NULL);
@@ -39,7 +39,7 @@ bool FTGlyphContainer::Add( FTGlyph* tempGlyph, unsigned int g)
}
-FTGlyph* FTGlyphContainer::Glyph( const unsigned int c) const
+const FTGlyph* const FTGlyphContainer::Glyph( const unsigned int c) const
{
return glyphs[face->CharIndex( c)];
}