Skip to content

Commit

Permalink
refactor(codegen/plc4go): remove unnecessary cast on - operator
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Jul 28, 2022
1 parent 2239dba commit 7291746
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ private String toUnaryTermExpression(Field field, TypeReference fieldType, Unary
return tracer + "!(" + toExpression(field, fieldType, a, parserArguments, serializerArguments, serialize, false) + ")";
case "-":
tracer = tracer.dive("case -");
return tracer + "-(" + getCastExpressionForTypeReference(fieldType) + "(" + toExpression(field, fieldType, a, parserArguments, serializerArguments, serialize, false) + "))";
return tracer + "-(" + toExpression(field, fieldType, a, parserArguments, serializerArguments, serialize, false) + ")";
case "()":
tracer = tracer.dive("case ()");
return tracer + "(" + toExpression(field, fieldType, a, parserArguments, serializerArguments, serialize, false) + ")";
Expand Down

0 comments on commit 7291746

Please sign in to comment.