]> git.tdb.fi Git - libs/gui.git/blobdiff - source/graphics/glcontext.h
Use default member initializers and defaulted default constructors
[libs/gui.git] / source / graphics / glcontext.h
index 986dd91e9642cb68832a3d5021d9b66cc9ff7d5a..7f08f0e4026423e7d1b3b7c3dd657eae0ff781b1 100644 (file)
@@ -17,16 +17,14 @@ struct GLOptions
                LATEST_VERSION = 0xFFFFFFFF
        };
 
-       bool alpha;
-       bool stencil;
-       bool doublebuffer;
-       unsigned multisample;
-       bool forward_compatible;
-       bool core_profile;
-       unsigned gl_version_major;
-       unsigned gl_version_minor;
-
-       GLOptions();
+       bool alpha = false;
+       bool stencil = false;
+       bool doublebuffer = true;
+       unsigned multisample = 0;
+       bool forward_compatible = false;
+       bool core_profile = false;
+       unsigned gl_version_major = DEFAULT_VERSION;
+       unsigned gl_version_minor = DEFAULT_VERSION;
 };
 
 
@@ -47,7 +45,7 @@ private:
 
        Display &display;
        Window &window;
-       Private *priv;
+       Private *priv = 0;
 
 public:
        GLContext(Window &wnd, const GLOptions &opts = GLOptions());