ソースを参照

don't create a variant in the nodeset code generation when none is needed

Julius Pfrommer 9 年 前
コミット
dca6309272
共有1 個のファイルを変更した0 個の追加2 個の削除を含む
  1. 0 2
      tools/pyUANamespace/ua_builtin_types.py

+ 0 - 2
tools/pyUANamespace/ua_builtin_types.py

@@ -380,8 +380,6 @@ class opcua_value_t():
         # The following strategy applies to all other types, in particular strings and numerics.
         if self.value[0].__binTypeId__ == BUILTINTYPE_TYPEID_EXTENSIONOBJECT:
           code = code + self.value[0].printOpen62541CCode_SubType_build()
-        code.append("UA_Variant *" + self.parent.getCodePrintableID() + "_variant = UA_Variant_new();")
-        code.append(self.parent.getCodePrintableID() + "_variant->type = &UA_TYPES[UA_TYPES_" + self.value[0].stringRepresentation.upper() + "];")
         if self.value[0].__binTypeId__ == BUILTINTYPE_TYPEID_EXTENSIONOBJECT:
           code.append("UA_" + self.value[0].stringRepresentation + " *" + valueName + " = " + self.value[0].printOpen62541CCode_SubType() + ";")
           code.append("UA_Variant_setScalarCopy( &attr.value, " + valueName + ", &UA_TYPES[UA_TYPES_" + self.value[0].stringRepresentation.upper() + "]);")