Skip to content

Commit

Permalink
fix in cpp template for initialization of bool variables
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15811 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
niklwors committed Apr 14, 2013
1 parent 1597b90 commit 743bd7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/Template/CodegenCpp.tpl
Expand Up @@ -4484,7 +4484,7 @@ template daeExp(Exp exp, Context context, Text &preExp /*BUFP*/, Text &varDecls
match exp
case e as ICONST(__) then '<%integer%>' /* Yes, we need to cast int to long on 64-bit arch... */
case e as RCONST(__) then real
case e as BCONST(__) then if bool then "(1)" else "(0)"
case e as BCONST(__) then if bool then "true" else "false"
case e as ENUM_LITERAL(__) then index
case e as CREF(__) then daeExpCrefRhs(e, context, &preExp /*BUFC*/, &varDecls /*BUFD*/,simCode)
case e as CAST(__) then daeExpCast(e, context, &preExp /*BUFC*/, &varDecls /*BUFD*/,simCode)
Expand Down

0 comments on commit 743bd7b

Please sign in to comment.