]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/text.h
Use nullptr instead of 0 for pointers
[libs/gltk.git] / source / text.h
index 6ddbb231b37871089f90e6cc90ecfa3ba1a735e9..6de3573fc6dfda35495b40d303065d412413a599 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <string>
 #include <vector>
+#include "mspgltk_api.h"
 #include "state.h"
 
 namespace Msp {
@@ -16,21 +17,21 @@ class Style;
 /**
 Stores and renders text.  Supports multiline text.
 */
-class Text
+class MSPGLTK_API Text
 {
 private:
        struct Line
        {
-               unsigned start;
-               unsigned bytes;
-               unsigned length;
-               unsigned width;
+               unsigned start = 0;
+               unsigned bytes = 0;
+               unsigned length = 0;
+               unsigned width = 0;
        };
 
        struct RenderData;
        struct CoordsToGeomData;
 
-       const Style *style;
+       const Style *style = nullptr;
        std::string text;
        std::vector<Line> lines;