Skip to content

Commit

Permalink
use listEmpty() instead of listLength()==0
Browse files Browse the repository at this point in the history
  • Loading branch information
hkiel authored and OpenModelica-Hudson committed May 18, 2016
1 parent c628fac commit 0e88db8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Compiler/BackEnd/Initialization.mo
Expand Up @@ -2413,7 +2413,7 @@ protected
DAE.Exp condition;
algorithm
outEqnLst := match (inEqn)
case BackendDAE.WHEN_EQUATION(whenEquation=BackendDAE.WHEN_STMTS(condition=condition, elsewhenPart=NONE())) guard(listLength(BackendDAEUtil.getConditionList(condition)) == 0) then inEqnLst;
case BackendDAE.WHEN_EQUATION(whenEquation=BackendDAE.WHEN_STMTS(condition=condition, elsewhenPart=NONE())) guard listEmpty(BackendDAEUtil.getConditionList(condition)) then inEqnLst;
else inEqn::inEqnLst;
end match;
end filterWhenEquation;
Expand Down
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/InstSection.mo
Expand Up @@ -3935,7 +3935,7 @@ algorithm
dims1 = Types.getDimensions(inLhsType);
dims2 = Types.getDimensions(inRhsType);
false = List.isEqualOnTrue(dims1, dims2, Expression.dimensionsEqual);
false = (listLength(dims1) + listLength(dims2)) == 0;
false = (listEmpty(dims1) and listEmpty(dims2));
cref_str1 = ComponentReference.printComponentRefStr(inLhsCref);
cref_str2 = ComponentReference.printComponentRefStr(inRhsCref);
str1 = "[" + ExpressionDump.dimensionsString(dims1) + "]";
Expand Down

0 comments on commit 0e88db8

Please sign in to comment.