Commit 0ef5a027 by Bob Duff Committed by Pierre-Marie de Rodat

[Ada] Minor cleanup implementation of Ada.Containers.Vectors

2018-05-28  Bob Duff  <duff@adacore.com>

gcc/ada/

	* libgnat/a-convec.adb (Query_Element): Minor cleanup: remove an
	unnecessary use of 'Unrestricted_Access.

From-SVN: r260826
parent 24161618
2018-05-28 Bob Duff <duff@adacore.com>
* libgnat/a-convec.adb (Query_Element): Minor cleanup: remove an
unnecessary use of 'Unrestricted_Access.
2018-05-28 Hristian Kirtchev <kirtchev@adacore.com>
* repinfo.adb (Expr_Value_S): New routine.
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment