]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/partcache.h
Simplify constructors with C++11
[libs/gltk.git] / source / partcache.h
index 9dc71bf184c8652de6b5e4939a8bab9224a2f512..af697339efcfa0ed5e46cb998235e0c156ac13c0 100644 (file)
@@ -12,11 +12,10 @@ class Part;
 
 struct CachedPart
 {
-       const Part *part;
-       const GL::Texture2D *texture;
-       GL::Mesh *mesh;
+       const Part *part = 0;
+       const GL::Texture2D *texture = 0;
+       GL::Mesh *mesh = 0;
 
-       CachedPart();
        ~CachedPart();
 };
 
@@ -36,14 +35,12 @@ public:
        typedef std::list<CachedPart> PartList;
 
 private:
-       bool rebuilding;
+       bool rebuilding = false;
        PartList parts;
        PartList::iterator next;
        PartList::iterator current;
 
 public:
-       PartCache();
-
        void begin_rebuild();
        void insert_special(const Part &);
        GL::Mesh &create_mesh(const Part &, const GL::Texture2D &);