Skip to content

Commit

Permalink
Fix issue lcm-proj#303 - forbidden implicit conversion double -> floa…
Browse files Browse the repository at this point in the history
…t in generated C# code
  • Loading branch information
hoxell committed Jan 8, 2020
1 parent 2357c6a commit ac1882a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lcmgen/emit_csharp.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ int emit_csharp(lcmgen_t *lcm)
} else if (!strcmp(lc->lctypename, "int64_t")) {
emit(2, "public const long %s = %sL;", lc->membername, lc->val_str);
} else if (!strcmp(lc->lctypename, "float")) {
emit(2, "public const float %s = %s;", lc->membername, lc->val_str);
emit(2, "public const float %s = %sf;", lc->membername, lc->val_str);
} else if (!strcmp(lc->lctypename, "double")) {
emit(2, "public const double %s = %s;", lc->membername, lc->val_str);
} else {
Expand Down

0 comments on commit ac1882a

Please sign in to comment.