From e45dfc2b20e4b9ba2614afe80fff95bf1c2e3510 Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Thu, 14 Jul 2016 01:12:21 +0000 Subject: [PATCH] Small code simplification as suggested in comment #15 of STR#2828 git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@11806 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Tree.cxx | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Fl_Tree.cxx b/src/Fl_Tree.cxx index 0484f69db..62fefdc08 100644 --- a/src/Fl_Tree.cxx +++ b/src/Fl_Tree.cxx @@ -827,12 +827,7 @@ void Fl_Tree::draw() { fl_color(FL_BLACK); - int tgt; - if (before) { - tgt = item->y(); - } else { - tgt = item->y() + item->h(); - } + int tgt = item->y() + (before ? 0 : item->h()); fl_line(item->x(), tgt, item->x() + item->w(), tgt); } } @@ -875,12 +870,7 @@ void Fl_Tree::draw() { fl_color(FL_BLACK); - int tgt; - if (before) { - tgt = item->y(); - } else { - tgt = item->y() + item->h(); - } + int tgt = item->y() + (before ? 0 : item->h()); fl_line(item->x(), tgt, item->x() + item->w(), tgt); } }