From 2b2ed338e7b4f7372fdd74feb33476dd7b94aea5 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 8 Nov 2016 06:58:44 +1100 Subject: Fixed a few errors turned up by latest GNAT --- src/adapad.adb | 10 ++++------ src/fltk_binding/fltk.ads | 4 ++-- to_do.txt | 1 + 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/adapad.adb b/src/adapad.adb index 8f1196b..079fad3 100644 --- a/src/adapad.adb +++ b/src/adapad.adb @@ -16,8 +16,6 @@ use FLTK.Widgets.Groups.Windows; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; -with Ada.Text_IO; - function Adapad return Integer is @@ -473,10 +471,10 @@ begin end; - Find.Set_Find_Callback (Do_Find_CB'Access); - Replace.Set_Replace_Callback (Do_Replace_CB'Access); - Buffer.Add_Modify_Callback (Mod_CB'Access); - Editor.Set_Callback (Quit_CB'Access); + Find.Set_Find_Callback (Do_Find_CB'Unchecked_Access); + Replace.Set_Replace_Callback (Do_Replace_CB'Unchecked_Access); + Buffer.Add_Modify_Callback (Mod_CB'Unchecked_Access); + Editor.Set_Callback (Quit_CB'Unchecked_Access); Editor.Set_Buffer (Buffer); diff --git a/src/fltk_binding/fltk.ads b/src/fltk_binding/fltk.ads index fab93e0..490050d 100644 --- a/src/fltk_binding/fltk.ads +++ b/src/fltk_binding/fltk.ads @@ -28,8 +28,8 @@ private type Wrapper is abstract new Ada.Finalization.Limited_Controlled with record Void_Ptr : System.Address; - end record - with Type_Invariant => Has_Valid_Ptr (Wrapper); + end record; + -- with Type_Invariant => Has_Valid_Ptr (Wrapper); -- unsure if the above invariant is doing what I'm after -- oh well, something to work on diff --git a/to_do.txt b/to_do.txt index d65e746..c196da5 100644 --- a/to_do.txt +++ b/to_do.txt @@ -5,6 +5,7 @@ To Do: - clean up code to eliminate use clauses, standardise styling - put find/replace/about in their own packages - change build to be dynamically linked +- remove the need for unchecked_access callbacks - improve find, replace, undo/redo - add word count feature - suppress unnecessary left/right scrollbar -- cgit