Skip to content

Commit 5e15c8f

Browse files
committed
Minor code simplification.
no-tn-check
1 parent bef385e commit 5e15c8f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/templates_parser-filter.adb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,17 +1041,13 @@ package body Filter is
10411041
P : Parameter_Data := No_Parameter) return String
10421042
is
10431043
pragma Unreferenced (C);
1044-
use type GNAT.Regpat.Match_Location;
1045-
1046-
Matches : GNAT.Regpat.Match_Array (0 .. 0);
10471044
begin
10481045
if P = No_Parameter then
10491046
raise Template_Error with "missing parameter for MATCH filter";
1050-
end if;
10511047

1052-
GNAT.Regpat.Match (P.Regexp.all, S, Matches);
1048+
end if;
10531049

1054-
if Matches (0) = GNAT.Regpat.No_Match then
1050+
if GNAT.Regpat.Match (P.Regexp.all, S) = S'First - 1 then
10551051
return "FALSE";
10561052
else
10571053
return "TRUE";

0 commit comments

Comments
 (0)