Commit 552366aff0937dd227ae3d0d08de02d159a03ccd

sammy 2008-05-02T14:52:54

* Add a virtual destructor to FTLayoutImpl to make sure derived classes have their destructors called. * Make all FTLayoutImpl members protected. Only its derived classes and FTLayout need to access them.

diff --git a/src/FTLayout/FTLayout.cpp b/src/FTLayout/FTLayout.cpp
index 227ceac..d0a550f 100644
--- a/src/FTLayout/FTLayout.cpp
+++ b/src/FTLayout/FTLayout.cpp
@@ -100,6 +100,19 @@ FT_Error FTLayout::Error() const
 //
 
 
+FTLayoutImpl::FTLayoutImpl() :
+    err(0)
+{
+    ;
+}
+
+
+FTLayoutImpl::~FTLayoutImpl()
+{
+    ;
+}
+
+
 void FTLayoutImpl::DoRender(FTFont *font, const unsigned int chr,
                             const unsigned int nextChr, int renderMode)
 {
diff --git a/src/FTLayout/FTLayoutImpl.h b/src/FTLayout/FTLayoutImpl.h
index 9912587..6d739d7 100644
--- a/src/FTLayout/FTLayoutImpl.h
+++ b/src/FTLayout/FTLayoutImpl.h
@@ -34,7 +34,11 @@ class FTLayoutImpl
 {
         friend class FTLayout;
 
-    public:
+    protected:
+        FTLayoutImpl();
+
+        virtual ~FTLayoutImpl();
+
         /**
          * Get the bounding box for a formatted string.
          *