[Ada] Minor cleanup implementation of Ada.Containers.Vectors
authorBob Duff <duff@adacore.com>
Mon, 28 May 2018 08:54:01 +0000 (08:54 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 28 May 2018 08:54:01 +0000 (08:54 +0000)
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

gcc/ada/ChangeLog
gcc/ada/libgnat/a-convec.adb

index 7a0a60d..8c1331d 100644 (file)
@@ -1,3 +1,8 @@
+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.
index b098860..ce784df 100644 (file)
@@ -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