Skip to content

Commit

Permalink
* Code simplification
Browse files Browse the repository at this point in the history
        For issue#61
  • Loading branch information
yoogx committed Jan 14, 2021
1 parent 1b28ef0 commit 39973ba
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/backends/aadl_xml/ocarina-backends-aadl_xml-main.adb
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ package body Ocarina.Backends.AADL_XML.Main is
-- Visit_Component --
---------------------

Root_System_Processed : boolean := False;

procedure Visit_Component (E : Node_Id) is
Category : constant Component_Category := Get_Category_Of_Component (E);
N : Node_Id;
Expand All @@ -174,9 +172,8 @@ package body Ocarina.Backends.AADL_XML.Main is

begin
if Category = CC_System and then
not Root_System_Processed
E = Root_System_Node
then
Root_system_Processed := True;
P := Map_HI_Node (E);
Push_Entity (P);

Expand Down Expand Up @@ -553,7 +550,9 @@ package body Ocarina.Backends.AADL_XML.Main is
end loop;
end if;

if Category = CC_System then
if Category = CC_System and then
E = Root_System_Node
then
Pop_Entity;
Pop_Entity; -- A
end if;
Expand Down

0 comments on commit 39973ba

Please sign in to comment.