Skip to content

Commit

Permalink
fix for assign array in cpp template
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@22813 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
niklwors committed Oct 20, 2014
1 parent 4086780 commit 1975f0e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Compiler/Template/CodegenCpp.tpl
Expand Up @@ -5,6 +5,8 @@ import CodegenUtil.*;
// SECTION: SIMULATION TARGET, ROOT TEMPLATE




template translateModel(SimCode simCode, Boolean useFlatArrayNotation)
::=
match simCode
Expand Down Expand Up @@ -10712,9 +10714,6 @@ case SOME(when as STMT_WHEN(__)) then
end algStatementWhenElse;





template writeLhsCref(Exp exp, String rhsStr, Context context, Text &preExp /*BUFP*/,
Text &varDecls /*BUFP*/, SimCode simCode, Boolean useFlatArrayNotation)
"Generates code for writing a returnStructur to var."
Expand All @@ -10727,7 +10726,7 @@ case CREF(ty= t as DAE.T_ARRAY(__)) then
match context
case SIMULATION_CONTEXT(__) then
<<
assign_array(<%lhsStr%>,<%rhsStr%> );
<%lhsStr%>.assign(<%rhsStr%> );
>>
else
'<%lhsStr%>.assign(<%rhsStr%>);'
Expand Down

0 comments on commit 1975f0e

Please sign in to comment.