From df843c7fe48f33d25981d03975e670a3e7159031 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sun, 7 May 2017 12:04:33 +1000 Subject: Further code cleanup --- src/fltk-widgets.adb | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'src/fltk-widgets.adb') diff --git a/src/fltk-widgets.adb b/src/fltk-widgets.adb index 292f274..d46b1c4 100644 --- a/src/fltk-widgets.adb +++ b/src/fltk-widgets.adb @@ -22,10 +22,6 @@ package body FLTK.Widgets is (W, D : in System.Address); pragma Import (C, widget_set_draw_hook, "widget_set_draw_hook"); - procedure fl_widget_draw - (W : in System.Address); - pragma Import (C, fl_widget_draw, "fl_widget_draw"); - function new_fl_widget (X, Y, W, H : in Interfaces.C.int; Text : in Interfaces.C.char_array) @@ -147,23 +143,13 @@ package body FLTK.Widgets is - procedure Draw - (This : in out Widget) is - begin - -- this space intentionally left blank - null; - end Draw; - - - - procedure Finalize (This : in out Widget) is begin - if This.Void_Ptr /= System.Null_Address then - if This in Widget then - free_fl_widget (This.Void_Ptr); - end if; + if This in Widget and then + This.Void_Ptr /= System.Null_Address + then + free_fl_widget (This.Void_Ptr); end if; end Finalize; -- cgit