From fb48bc22cca0adc38689ba7c96666ff772ab91a6 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 3 Apr 2025 17:11:25 +0200 Subject: Remove redundant Fl_Group::clear() from ~Fl_Scroll() Fl_Group::clear() is called in Fl_Group's d'tor anyway. Technically we don't need to remove hscrollbar and scrollbar because they are destroyed (and thus removed from Fl_Group) before Fl_Group's d'tor is executed but this is left for clarity and to guarantee the order (see comment). --- src/Fl_Scroll.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') diff --git a/src/Fl_Scroll.cxx b/src/Fl_Scroll.cxx index e11ad4cb1..e90809d1f 100644 --- a/src/Fl_Scroll.cxx +++ b/src/Fl_Scroll.cxx @@ -1,7 +1,7 @@ // // Fl_Scroll widget for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2022 by Bill Spitzak and others. +// Copyright 1998-2025 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -41,7 +41,6 @@ void Fl_Scroll::clear() { Fl_Scroll::~Fl_Scroll() { remove(hscrollbar); // remove last child first remove(scrollbar); - Fl_Group::clear(); } /** Ensure the scrollbars are the last children. -- cgit v1.2.3