[gtkmm/gtkmm-3-22] gtk-demo/demowindow: Remove unnecessary null check



commit 6829b65b00446c3ab2d0d5041b45b5474bffea3f
Author: Daniel Boles <dboles src gmail com>
Date:   Sat Jun 3 10:53:31 2017 +0100

    gtk-demo/demowindow: Remove unnecessary null check
    
    There is no way that the pointer d can become null here.

 demos/gtk-demo/demowindow.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/demos/gtk-demo/demowindow.cc b/demos/gtk-demo/demowindow.cc
index 9e3e8c8..88c8e2a 100644
--- a/demos/gtk-demo/demowindow.cc
+++ b/demos/gtk-demo/demowindow.cc
@@ -123,7 +123,7 @@ void DemoWindow::fill_tree()
   /* this code only supports 1 level of children. If we
    * want more we probably have to use a recursing function.
    */
-  for (auto d = testgtk_demos; d && d->title; ++d)
+  for (auto d = testgtk_demos; d->title; ++d)
   {
     Gtk::TreeRow row = *(m_refTreeStore->append());
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]