Initialisation list. Made render() arg 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 38 39 40 41 42 43 44
diff --git a/include/FTPixmapGlyph.h b/include/FTPixmapGlyph.h
index f8396b3..d014ca1 100755
--- a/include/FTPixmapGlyph.h
+++ b/include/FTPixmapGlyph.h
@@ -12,9 +12,9 @@ class FTPixmapGlyph : public FTGlyph
{
public:
// methods
- FTPixmapGlyph( FT_Glyph glyph, int glyphIndex);
+ FTPixmapGlyph( FT_Glyph glyph, const int glyphIndex);
virtual ~FTPixmapGlyph();
- virtual float Render( FT_Vector& v);
+ virtual float Render( const FT_Vector& v);
// attributes
diff --git a/src/FTPixmapGlyph.cpp b/src/FTPixmapGlyph.cpp
index de7726f..1860a20 100755
--- a/src/FTPixmapGlyph.cpp
+++ b/src/FTPixmapGlyph.cpp
@@ -4,8 +4,12 @@
#include "FTGL.h"
-FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph, int gi)
-: FTGlyph(gi)
+FTPixmapGlyph::FTPixmapGlyph( FT_Glyph glyph, const int gi)
+: FTGlyph(gi),
+ destWidth(0),
+ destHeight(0),
+ numGreys(0),
+ data(0)
{
if( !glyph->format == ft_glyph_format_bitmap)
{ return;}
@@ -63,7 +67,7 @@ FTPixmapGlyph::~FTPixmapGlyph()
}
-float FTPixmapGlyph::Render( FT_Vector& pen)
+float FTPixmapGlyph::Render( const FT_Vector& pen)
{
if( data != 0 )
{