From: Bob Duff Date: Mon, 28 May 2018 08:54:01 +0000 (+0000) Subject: [Ada] Minor cleanup implementation of Ada.Containers.Vectors X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ef5a027520ffd0b0decae729b9df32ffa8b93f9;p=gcc.git [Ada] Minor cleanup implementation of Ada.Containers.Vectors 2018-05-28 Bob Duff gcc/ada/ * libgnat/a-convec.adb (Query_Element): Minor cleanup: remove an unnecessary use of 'Unrestricted_Access. From-SVN: r260826 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7a0a60dfb56..8c1331d5524 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-05-28 Bob Duff + + * libgnat/a-convec.adb (Query_Element): Minor cleanup: remove an + unnecessary use of 'Unrestricted_Access. + 2018-05-28 Hristian Kirtchev * repinfo.adb (Expr_Value_S): New routine. diff --git a/gcc/ada/libgnat/a-convec.adb b/gcc/ada/libgnat/a-convec.adb index b098860ba70..ce784dfb228 100644 --- a/gcc/ada/libgnat/a-convec.adb +++ b/gcc/ada/libgnat/a-convec.adb @@ -2307,14 +2307,12 @@ package body Ada.Containers.Vectors is Process : not null access procedure (Element : Element_Type)) is Lock : With_Lock (Container.TC'Unrestricted_Access); - V : Vector renames Container'Unrestricted_Access.all; - begin if Checks and then Index > Container.Last then raise Constraint_Error with "Index is out of range"; end if; - Process (V.Elements.EA (Index)); + Process (Container.Elements.EA (Index)); end Query_Element; procedure Query_Element