summaryrefslogtreecommitdiff
path: root/lowlevelil.cpp
diff options
context:
space:
mode:
authorBrian Potchik <brian@vector35.com>2018-01-11 17:10:34 -0500
committerBrian Potchik <brian@vector35.com>2018-01-11 17:10:34 -0500
commit1df49afa5522d73d509d20db9588294fe259085f (patch)
tree089a2ff85c527c485a9d8bd7f3b9c6d234f2fa2f /lowlevelil.cpp
parentbc779f1e0140a933d65926b9af840a80636a6dd4 (diff)
API Temporary Object Elimination.
Diffstat (limited to 'lowlevelil.cpp')
-rw-r--r--lowlevelil.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/lowlevelil.cpp b/lowlevelil.cpp
index 690f0b41..6c59b704 100644
--- a/lowlevelil.cpp
+++ b/lowlevelil.cpp
@@ -392,16 +392,8 @@ bool LowLevelILFunction::GetExprText(Architecture* arch, ExprId expr, vector<Ins
tokens.clear();
for (size_t i = 0; i < count; i++)
{
- InstructionTextToken token;
- token.type = list[i].type;
- token.text = list[i].text;
- token.value = list[i].value;
- token.size = list[i].size;
- token.operand = list[i].operand;
- token.context = list[i].context;
- token.confidence = list[i].confidence;
- token.address = list[i].address;
- tokens.push_back(token);
+ tokens.emplace_back(list[i].type, list[i].context, list[i].text, list[i].address, list[i].value, list[i].size,
+ list[i].operand, list[i].confidence);
}
BNFreeInstructionText(list, count);
@@ -421,16 +413,8 @@ bool LowLevelILFunction::GetInstructionText(Function* func, Architecture* arch,
tokens.clear();
for (size_t i = 0; i < count; i++)
{
- InstructionTextToken token;
- token.type = list[i].type;
- token.text = list[i].text;
- token.value = list[i].value;
- token.size = list[i].size;
- token.operand = list[i].operand;
- token.context = list[i].context;
- token.confidence = list[i].confidence;
- token.address = list[i].address;
- tokens.push_back(token);
+ tokens.emplace_back(list[i].type, list[i].context, list[i].text, list[i].address, list[i].value, list[i].size,
+ list[i].operand, list[i].confidence);
}
BNFreeInstructionText(list, count);