Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | s_expressions-generic_caches: turn a useless check into a precondition |
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
f06c3f6401952346dca22fe7fba90a67 |
| User & Date: | nat 2014-02-23 17:55:02.105 |
Context
|
2014-02-24
| ||
| 19:31 | s_expressions-cache_tests: add checks using empty reference and cursor check-in: 7d6b6a6e6e user: nat tags: trunk | |
|
2014-02-23
| ||
| 17:55 | s_expressions-generic_caches: turn a useless check into a precondition check-in: f06c3f6401 user: nat tags: trunk | |
|
2014-02-22
| ||
| 13:46 | s_expressions-generic_caches: fix level compuation of lists that have just been opened check-in: 7ac5ffc727 user: nat tags: trunk | |
Changes
Changes to src/natools-s_expressions-generic_caches.adb.
| ︙ | ︙ | |||
73 74 75 76 77 78 79 |
return Tree'(Ada.Finalization.Limited_Controlled
with Root | Last => null, Opening => False);
end Create_Tree;
function Duplicate (Source : Tree) return Tree is
function Dup_List (First, Parent : Node_Access) return Node_Access;
| > | | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
return Tree'(Ada.Finalization.Limited_Controlled
with Root | Last => null, Opening => False);
end Create_Tree;
function Duplicate (Source : Tree) return Tree is
function Dup_List (First, Parent : Node_Access) return Node_Access;
function Dup_Node (N : not null Node_Access; Parent : Node_Access)
return Node_Access;
New_Last : Node_Access := null;
function Dup_List (First, Parent : Node_Access) return Node_Access is
Source : Node_Access := First;
Result, Target : Node_Access;
begin
|
| ︙ | ︙ | |||
95 96 97 98 99 100 101 |
exit when Source = null;
Target.Next := Dup_Node (Source, Parent);
Target := Target.Next;
end loop;
return Result;
end Dup_List;
| > | > < < < < | 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
exit when Source = null;
Target.Next := Dup_Node (Source, Parent);
Target := Target.Next;
end loop;
return Result;
end Dup_List;
function Dup_Node (N : not null Node_Access; Parent : Node_Access)
return Node_Access
is
Result : Node_Access;
begin
case N.Kind is
when Atom_Node =>
Result := new Node'(Kind => Atom_Node,
Parent => Parent,
Next => null,
Data => new Atom'(N.Data.all));
when List_Node =>
|
| ︙ | ︙ |