From c4b1dd712783e7474570705e6d95183a0c02a76e Mon Sep 17 00:00:00 2001 From: Xusheng Date: Fri, 5 Feb 2021 20:28:13 +0800 Subject: add persistent search result --- linearviewcursor.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'linearviewcursor.cpp') diff --git a/linearviewcursor.cpp b/linearviewcursor.cpp index c9101594..55211e00 100644 --- a/linearviewcursor.cpp +++ b/linearviewcursor.cpp @@ -198,22 +198,7 @@ vector LinearViewCursor::GetLines() vector result; result.reserve(count); for (size_t i = 0; i < count; i++) - { - LinearDisassemblyLine line; - line.type = lines[i].type; - line.function = lines[i].function ? new Function(BNNewFunctionReference(lines[i].function)) : nullptr; - line.block = lines[i].block ? new BasicBlock(BNNewBasicBlockReference(lines[i].block)) : nullptr; - line.contents.addr = lines[i].contents.addr; - line.contents.instrIndex = lines[i].contents.instrIndex; - line.contents.highlight = lines[i].contents.highlight; - line.contents.tokens = InstructionTextToken::ConvertInstructionTextTokenList(lines[i].contents.tokens, lines[i].contents.count); - line.contents.tags = Tag::ConvertTagList(lines[i].contents.tags, lines[i].contents.tagCount); - line.contents.typeInfo.hasTypeInfo = lines[i].contents.typeInfo.hasTypeInfo; - line.contents.typeInfo.fieldIndex = lines[i].contents.typeInfo.fieldIndex; - line.contents.typeInfo.parentType = lines[i].contents.typeInfo.parentType ? - new Type(BNNewTypeReference(lines[i].contents.typeInfo.parentType)) : nullptr; - result.push_back(line); - } + result.push_back(LinearDisassemblyLine::FromAPIObject(&lines[i])); BNFreeLinearDisassemblyLines(lines, count); return result; -- cgit v1.3.1