aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBob Duff <duff@adacore.com>2018-05-28 08:54:01 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-05-28 08:54:01 +0000
commit0ef5a027520ffd0b0decae729b9df32ffa8b93f9 (patch)
treec75a614e90826bf1c706f10485ae4726f53c380b /gcc
parent24161618d265dbd7543e1286882ec517bed66f5b (diff)
downloadgcc-0ef5a027520ffd0b0decae729b9df32ffa8b93f9.zip
gcc-0ef5a027520ffd0b0decae729b9df32ffa8b93f9.tar.gz
gcc-0ef5a027520ffd0b0decae729b9df32ffa8b93f9.tar.bz2
[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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/libgnat/a-convec.adb4
2 files changed, 6 insertions, 3 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 7a0a60d..8c1331d 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -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.
diff --git a/gcc/ada/libgnat/a-convec.adb b/gcc/ada/libgnat/a-convec.adb
index b098860..ce784df 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