]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Simplify constructors with C++11
[libs/gltk.git] / source / widget.h
index 19db87985780223df3a85b51e6f1b5eae77aac72..9b86691e48343344b723af0ad2d90726d82ff6b6 100644 (file)
@@ -47,17 +47,17 @@ public:
 protected:
        Geometry geom;
        std::string style_name;
-       const Style *style;
-       State state;
-       bool visible;
-       InputType input_type;
-       Container *parent;
+       const Style *style = 0;
+       State state = NORMAL;
+       bool visible = true;
+       InputType input_type = INPUT_NONE;
+       Container *parent = 0;
        std::string tooltip;
        PartCache part_cache;
-       bool rebuild_needed;
+       bool rebuild_needed = false;
        Time::TimeDelta anim_interval;
 
-       Widget();
+       Widget() = default;
 private:
        Widget(const Widget &);
        Widget &operator=(const Widget &);