You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2021/09/26 14:30:53 UTC
[plc4x] branch develop updated: fix build: replace strange call in
c-generator
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/develop by this push:
new f902c74 fix build: replace strange call in c-generator
f902c74 is described below
commit f902c74c8239c4159b75f509bd1444cc3db45a65
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Sun Sep 26 16:30:45 2021 +0200
fix build: replace strange call in c-generator
---
.../java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java b/code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
index b303a5d..445d906 100644
--- a/code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
+++ b/code-generation/language-c/src/main/java/org/apache/plc4x/language/c/CLanguageTemplateHelper.java
@@ -590,10 +590,9 @@ public class CLanguageTemplateHelper extends BaseFreemarkerLanguageTemplateHelpe
}
final VariableLiteral sourceTerm = (VariableLiteral) vl.getArgs().get(0);
final VariableLiteral typeTerm = (VariableLiteral) vl.getArgs().get(1);
- ComplexTypeReference castTypeReference = typeTerm::getName;
- final TypeDefinition castType = getTypeDefinitionForTypeReference(castTypeReference);
+ final TypeDefinition castType = getTypeDefinitions().get(typeTerm.getName());
// If we're casting to a sub-type of a discriminated value, we got to cast to the parent
- // type instead and add the name of the sub-type as prefix to the property we're tryging to
+ // type instead and add the name of the sub-type as prefix to the property we're trying to
// access next.
StringBuilder sb = new StringBuilder();
sb.append("((");