]> git.tdb.fi Git - libs/gl.git/blobdiff - source/builders/font.h
Use constructor delegation instead of init functions when possible
[libs/gl.git] / source / builders / font.h
index 18c225c13a3dd0399f6f767b3f168a5588d76daa..af65da8af9ae15d160482397fccdac70d8429d5d 100644 (file)
@@ -5,7 +5,6 @@
 #include <string>
 #include <msp/datafile/objectloader.h>
 #include <msp/stringcodec/utf8.h>
-#include "vertexarray.h"
 
 namespace Msp {
 namespace GL {
@@ -22,11 +21,11 @@ public:
        class Loader: public DataFile::CollectionObjectLoader<Font>
        {
        public:
-               Loader(Font &);
-               Loader(Font &, Collection &);
-
+               Loader(Font &f): Loader(f, 0) { }
+               Loader(Font &f, Collection &c): Loader(f, &c) { }
        private:
-               void init();
+               Loader(Font &, Collection *);
+
                void glyph(unsigned);
                void kerning(unsigned, unsigned, float);
                void ligature(unsigned, unsigned, unsigned);