diff options
Diffstat (limited to 'type.cpp')
| -rw-r--r-- | type.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -504,7 +504,7 @@ Confidence<Ref<Type>> Type::GetChildType() const { BNTypeWithConfidence type = BNGetChildType(m_object); if (type.type) - return Confidence<Ref<Type>>(new Type(type.type), type.confidence); + return Confidence<Ref<Type>>(new Type(BNNewTypeReference(type.type)), type.confidence); return nullptr; } @@ -737,7 +737,7 @@ Ref<Type> Type::NamedType(const string& id, const QualifiedName& name, Type* typ BNQualifiedName nameObj = name.GetAPIObject(); BNType* coreObj = BNCreateNamedTypeReferenceFromTypeAndId(id.c_str(), &nameObj, type ? type->GetObject() : nullptr); QualifiedName::FreeAPIObject(&nameObj); - return coreObj ? new Type(coreObj) : nullptr; + return coreObj ? new Type(BNNewTypeReference(coreObj)) : nullptr; } @@ -746,7 +746,7 @@ Ref<Type> Type::NamedType(BinaryView* view, const QualifiedName& name) BNQualifiedName nameObj = name.GetAPIObject(); BNType* coreObj = BNCreateNamedTypeReferenceFromType(view->GetObject(), &nameObj); QualifiedName::FreeAPIObject(&nameObj); - return coreObj ? new Type(coreObj) : nullptr; + return coreObj ? new Type(BNNewTypeReference(coreObj)) : nullptr; } @@ -965,7 +965,7 @@ Ref<Type> Type::WithReplacedStructure(Structure* from, Structure* to) BNFreeType(result); return this; } - return new Type(result); + return new Type(BNNewTypeReference(result)); } @@ -977,7 +977,7 @@ Ref<Type> Type::WithReplacedEnumeration(Enumeration* from, Enumeration* to) BNFreeType(result); return this; } - return new Type(result); + return new Type(BNNewTypeReference(result)); } @@ -989,7 +989,7 @@ Ref<Type> Type::WithReplacedNamedTypeReference(NamedTypeReference* from, NamedTy BNFreeType(result); return this; } - return new Type(result); + return new Type(BNNewTypeReference(result)); } @@ -1208,7 +1208,7 @@ Confidence<Ref<Type>> TypeBuilder::GetChildType() const { BNTypeWithConfidence type = BNGetTypeBuilderChildType(m_object); if (type.type) - return Confidence<Ref<Type>>(new Type(type.type), type.confidence); + return Confidence<Ref<Type>>(new Type(BNNewTypeReference(type.type)), type.confidence); return nullptr; } |
