Mercurial > hg > CbC > CbC_gcc
comparison gcc/ada/libgnat/a-coorma.adb @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
4 -- -- | 4 -- -- |
5 -- A D A . C O N T A I N E R S . O R D E R E D _ M A P S -- | 5 -- A D A . C O N T A I N E R S . O R D E R E D _ M A P S -- |
6 -- -- | 6 -- -- |
7 -- B o d y -- | 7 -- B o d y -- |
8 -- -- | 8 -- -- |
9 -- Copyright (C) 2004-2017, Free Software Foundation, Inc. -- | 9 -- Copyright (C) 2004-2018, 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- -- |
479 if Checks and then Position.Node = null then | 479 if Checks and then Position.Node = null then |
480 raise Constraint_Error with | 480 raise Constraint_Error with |
481 "Position cursor of function Element equals No_Element"; | 481 "Position cursor of function Element equals No_Element"; |
482 end if; | 482 end if; |
483 | 483 |
484 if Checks | |
485 and then (Left (Position.Node) = Position.Node | |
486 or else | |
487 Right (Position.Node) = Position.Node) | |
488 then | |
489 raise Program_Error with "dangling cursor"; | |
490 end if; | |
491 | |
484 pragma Assert (Vet (Position.Container.Tree, Position.Node), | 492 pragma Assert (Vet (Position.Container.Tree, Position.Node), |
485 "Position cursor of function Element is bad"); | 493 "Position cursor of function Element is bad"); |
486 | 494 |
487 return Position.Node.Element; | 495 return Position.Node.Element; |
488 end Element; | 496 end Element; |