diff options
| author | Brian Potchik <brian@vector35.com> | 2018-01-11 17:10:34 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2018-01-11 17:10:34 -0500 |
| commit | 1df49afa5522d73d509d20db9588294fe259085f (patch) | |
| tree | 089a2ff85c527c485a9d8bd7f3b9c6d234f2fa2f /lowlevelil.cpp | |
| parent | bc779f1e0140a933d65926b9af840a80636a6dd4 (diff) | |
API Temporary Object Elimination.
Diffstat (limited to 'lowlevelil.cpp')
| -rw-r--r-- | lowlevelil.cpp | 24 |
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); |
