]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/graphic.h
Use nullptr instead of 0 for pointers
[libs/gltk.git] / source / graphic.h
index 1ae0d5e22d8766a718bbd828329be7bb334663dd..32a06864f9dcebf260c9f52e154b141e95660ba1 100644 (file)
@@ -5,6 +5,7 @@
 #include <msp/gl/texture2d.h>
 #include <msp/datafile/objectloader.h>
 #include "geometry.h"
+#include "mspgltk_api.h"
 
 namespace Msp {
 namespace GLtk {
@@ -14,7 +15,7 @@ class Resources;
 /**
 Stores a single graphical element.  Graphics are used as parts of widgets.
 */
-class Graphic
+class MSPGLTK_API Graphic
 {
 public:
        class Loader: public DataFile::CollectionObjectLoader<Graphic, Resources>
@@ -32,12 +33,11 @@ public:
 private:
        Sides border;
        Sides shadow;
-       const GL::Texture2D *texture;
+       const GL::Texture2D *texture = nullptr;
        Geometry slice;
-       bool repeat;
+       bool repeat = false;
 
 public:
-       Graphic();
        const Sides &get_border() const { return border; }
        const Sides &get_shadow() const { return shadow; }
        const GL::Texture2D *get_texture() const { return texture; }