X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fwidget.cpp;h=4d990009d81002ece8cc5a8caeb2ac73606e0b3c;hb=81c4024fb6acf37df702a803dc4efdf82a81525a;hp=6ac4d2aa7d7679bc39512614ff32705f835891b6;hpb=b4a3d651f57c46507aaa99a71a14fea15f0e430d;p=libs%2Fgltk.git diff --git a/source/widget.cpp b/source/widget.cpp index 6ac4d2a..4d99000 100644 --- a/source/widget.cpp +++ b/source/widget.cpp @@ -10,21 +10,12 @@ using namespace std; namespace Msp { namespace GLtk { -Widget::Widget(): - style(0), - state(NORMAL), - visible(true), - input_type(INPUT_NONE), - parent(0), - rebuild_needed(false) -{ } - Widget::~Widget() { if(parent) { Container *p = parent; - parent = 0; + parent = nullptr; p->remove(*this); } } @@ -119,7 +110,7 @@ void Widget::set_parent(Container *p) catch(...) { // The container has not yet added the widget as its child - parent = 0; + parent = nullptr; throw; } } @@ -136,7 +127,7 @@ void Widget::update_style() for(top=this; top->parent; top=top->parent) ; Root *root = dynamic_cast(top); if(!root) - style = 0; + style = nullptr; else { string sname = get_class();