1919with Ada.Characters.Handling ; use Ada.Characters.Handling;
2020with Ada.Containers.Vectors ;
2121with Ada.Containers.Indefinite_Ordered_Maps ;
22- with Ada.Strings.Unbounded ;
2322with Ada.Text_IO ; use Ada.Text_IO;
2423
2524with ALI_Files ;
@@ -104,10 +103,7 @@ package body Annotations.Report is
104103 " =" => Message_Vectors." =" );
105104
106105 package String_Vectors is
107- new Ada.Containers.Vectors
108- (Natural,
109- Ada.Strings.Unbounded.Unbounded_String,
110- Ada.Strings.Unbounded." =" );
106+ new Ada.Containers.Vectors (Natural, Unbounded_String, " =" );
111107
112108 type Report_Pretty_Printer is new Pretty_Printer with record
113109 Current_File_Index : Source_File_Index;
@@ -302,7 +298,6 @@ package body Annotations.Report is
302298
303299 procedure Pretty_Print_End (Pp : in out Report_Pretty_Printer) is
304300 use ALI_Files, ALI_Files.ALI_Annotation_Maps;
305- use Ada.Strings.Unbounded;
306301
307302 Output : constant File_Access := Get_Output;
308303
@@ -397,7 +392,7 @@ package body Annotations.Report is
397392
398393 procedure Output_Message (C : Message_Vectors.Cursor) is
399394 M : Message renames Message_Vectors.Element (C);
400- Msg : constant String := To_String ( M.Msg) ;
395+ Msg : constant String := + M.Msg;
401396 First : Natural := Msg'First;
402397 begin
403398
@@ -551,7 +546,7 @@ package body Annotations.Report is
551546
552547 procedure Output_Message (C : Message_Vectors.Cursor) is
553548 M : Message renames Message_Vectors.Element (C);
554- Msg : constant String := To_String ( M.Msg) ;
549+ Msg : constant String := + M.Msg;
555550 First : Natural := Msg'First;
556551 Show_Vectors : constant Boolean :=
557552 (Switches.Show_MCDC_Vectors
@@ -625,19 +620,18 @@ package body Annotations.Report is
625620 -- Append summary line for general summary chapter
626621
627622 Pp.Summary.Append
628- (To_Unbounded_String
629- (Pluralize
630- (Item_Count,
631- (case MC is
632- when Coverage_Violations =>
633- Non_Exempted
634- & Coverage_Level'Val (MC)'Img & " " & Item,
635- when Other_Errors =>
636- " other message" ,
637- when Coverage_Exclusions =>
638- " coverage exclusion" ,
639- when Undetermined_Coverage =>
640- " undetermined coverage item" )) & " ." ));
623+ (+(Pluralize
624+ (Item_Count,
625+ (case MC is
626+ when Coverage_Violations =>
627+ Non_Exempted
628+ & Coverage_Level'Val (MC)'Img & " " & Item,
629+ when Other_Errors =>
630+ " other message" ,
631+ when Coverage_Exclusions =>
632+ " coverage exclusion" ,
633+ when Undetermined_Coverage =>
634+ " undetermined coverage item" )) & " ." ));
641635
642636 -- Count of total (coverable) and covered SCOs is displayed only
643637 -- if --all-messages is specified.
@@ -725,7 +719,7 @@ package body Annotations.Report is
725719 New_Line (Output.all );
726720
727721 for L of Pp.Summary loop
728- Put_Line (Output.all , To_String (L) );
722+ Put_Line (Output.all , +L );
729723 end loop ;
730724
731725 if Has_Exempted_Region then
@@ -835,8 +829,6 @@ package body Annotations.Report is
835829 -- ----------------------
836830
837831 procedure Pretty_Print_Start (Pp : in out Report_Pretty_Printer) is
838- use Ada.Strings.Unbounded;
839-
840832 Output : constant File_Access := Get_Output;
841833
842834 procedure Process_One_Trace (TF : Trace_File_Element);
@@ -850,11 +842,11 @@ package body Annotations.Report is
850842 Orig_Context : constant String := Original_Processing_Context (TF);
851843 begin
852844 New_Line (Output.all );
853- Put_Line (Output.all , To_String ( TF.Filename) );
845+ Put_Line (Output.all , + TF.Filename);
854846 Put_Line (Output.all , " kind : " & Image (TF.Kind));
855- Put_Line (Output.all , " program : " & To_String ( TF.Program_Name));
856- Put_Line (Output.all , " date : " & To_String ( TF.Time));
857- Put_Line (Output.all , " tag : " & To_String ( TF.User_Data));
847+ Put_Line (Output.all , " program : " & (+ TF.Program_Name));
848+ Put_Line (Output.all , " date : " & (+ TF.Time));
849+ Put_Line (Output.all , " tag : " & (+ TF.User_Data));
858850
859851 -- For a trace that has been processed in an earlier run, provide
860852 -- information on original coverage assessment context.
@@ -875,15 +867,14 @@ package body Annotations.Report is
875867 Put_Line (Output.all , " Date and time of execution: "
876868 & Image (Pp.Context.Timestamp));
877869 Put_Line (Output.all , " Tool version: XCOV "
878- & To_String ( Pp.Context.Version));
870+ & (+ Pp.Context.Version));
879871 New_Line (Output.all );
880872
881873 Put_Line (Output.all , " Command line:" );
882- Put_Line (Output.all , To_String ( Pp.Context.Command) );
874+ Put_Line (Output.all , + Pp.Context.Command);
883875 New_Line (Output.all );
884876
885- Put_Line (Output.all , " Coverage level: "
886- & To_String (Pp.Context.Levels));
877+ Put_Line (Output.all , " Coverage level: " & (+Pp.Context.Levels));
887878 New_Line (Output.all );
888879
889880 Put_Line (Output.all , " Trace files:" );
0 commit comments