Skip to content

Commit

Permalink
- Some code cleanup.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14009 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Nov 21, 2012
1 parent bcd287c commit 89f929f
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions Compiler/FrontEnd/SCodeInst.mo
Original file line number Diff line number Diff line change
Expand Up @@ -2844,18 +2844,7 @@ algorithm
Absyn.Info info;
Element el;
list<Element> rest_el;
list<Element> inputs, outputs, locals, els;

case ({}, _, _, _)
then (listReverse(inAccumInputs), listReverse(inAccumOutputs), listReverse(inAccumLocals));

// ignore packages! Modelica.Media.IdealGases.Common.SingleGasNasa.T_h contains package Internal.
case ((el as InstTypes.ELEMENT(component = InstTypes.PACKAGE(name = name))) :: rest_el,
inputs, outputs, locals)
equation
(inputs, outputs, locals) = getFunctionParameters2(rest_el, inputs, outputs, locals);
then
(inputs, outputs, locals);
list<Element> inputs, outputs, locals;

case ((el as InstTypes.ELEMENT(component = InstTypes.UNTYPED_COMPONENT(
name = name, baseType = ty, prefixes = prefs, info = info))) :: rest_el,
Expand All @@ -2868,12 +2857,16 @@ algorithm
then
(inputs, outputs, locals);

// ignore CONDITIONAL components
case ((el as InstTypes.CONDITIONAL_ELEMENT(component = _)) :: rest_el, inputs, outputs, locals)
// Ignore any elements which are not untyped components.
case (_ :: rest_el, inputs, outputs, locals)
equation
(inputs, outputs, locals) = getFunctionParameters2(rest_el, inputs, outputs, locals);
then
(inputs, outputs, locals);

case ({}, _, _, _)
then (listReverse(inAccumInputs), listReverse(inAccumOutputs), listReverse(inAccumLocals));

end match;
end getFunctionParameters2;

Expand Down

0 comments on commit 89f929f

Please sign in to comment.