Mercurial > hg > CbC > CbC_gcc
comparison gcc/ada/libgnat/a-cfhama.adb @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
4 -- -- | 4 -- -- |
5 -- A D A . C O N T A I N E R S . F O R M A L _ H A S H E D _ M A P S -- | 5 -- A D A . C O N T A I N E R S . F O R M A L _ H A S H E D _ M A P S -- |
6 -- -- | 6 -- -- |
7 -- B o d y -- | 7 -- B o d y -- |
8 -- -- | 8 -- -- |
9 -- Copyright (C) 2010-2018, Free Software Foundation, Inc. -- | 9 -- Copyright (C) 2010-2019, Free Software Foundation, Inc. -- |
10 -- -- | 10 -- -- |
11 -- GNAT is free software; you can redistribute it and/or modify it under -- | 11 -- GNAT is free software; you can redistribute it and/or modify it under -- |
12 -- terms of the GNU General Public License as published by the Free Soft- -- | 12 -- terms of the GNU General Public License as published by the Free Soft- -- |
13 -- ware Foundation; either version 3, or (at your option) any later ver- -- | 13 -- ware Foundation; either version 3, or (at your option) any later ver- -- |
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- | 14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- -- |
507 -- Free -- | 507 -- Free -- |
508 ---------- | 508 ---------- |
509 | 509 |
510 procedure Free (HT : in out Map; X : Count_Type) is | 510 procedure Free (HT : in out Map; X : Count_Type) is |
511 begin | 511 begin |
512 HT.Nodes (X).Has_Element := False; | 512 if X /= 0 then |
513 HT_Ops.Free (HT, X); | 513 pragma Assert (X <= HT.Capacity); |
514 HT.Nodes (X).Has_Element := False; | |
515 HT_Ops.Free (HT, X); | |
516 end if; | |
514 end Free; | 517 end Free; |
515 | 518 |
516 ---------------------- | 519 ---------------------- |
517 -- Generic_Allocate -- | 520 -- Generic_Allocate -- |
518 ---------------------- | 521 ---------------------- |