]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/panel.cpp
Use nullptr instead of 0 for pointers
[libs/gltk.git] / source / panel.cpp
index fa16ec7de2826733d04a876f7ec445953bc76a8d..155682616f44245bbe9ff5dbeb9f46f56a55552d 100644 (file)
@@ -27,8 +27,7 @@ namespace GLtk {
 TypeRegistry<Panel::Loader::AddChildType, Panel::Loader &> Panel::widget_registry;
 bool Panel::widget_registry_init_done = false;
 
-Panel::Panel():
-       layout(0)
+Panel::Panel()
 {
        input_type = INPUT_NAVIGATION;
 }
@@ -36,7 +35,7 @@ Panel::Panel():
 Panel::~Panel()
 {
        delete layout;
-       layout = 0;
+       layout = nullptr;
 }
 
 void Panel::set_layout(Layout *l)
@@ -135,7 +134,7 @@ bool Panel::navigate(Navigation nav)
 
 Widget *Panel::find_next_child(int origin_x, int origin_y, int origin_dim, int nav_x, int nav_y) const
 {
-       Widget *sibling = 0;
+       Widget *sibling = nullptr;
        int best_score = 0;
        for(const Child *c: children)
        {
@@ -211,7 +210,7 @@ void Panel::on_child_removed(Widget &wdg)
 Panel::Loader::Loader(Panel &p, map<string, Widget *> &m):
        DataFile::DerivedObjectLoader<Panel, Widget::Loader>(p),
        wdg_map(m),
-       last_widget(0)
+       last_widget(nullptr)
 {
        if(!widget_registry_init_done)
        {