Skip to content

Commit

Permalink
refactor: ♻️ Remove need for back_inserter in CodePreprocessing.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
DRovara committed Aug 7, 2024
1 parent f7966b6 commit b3e8903
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/common/parsing/CodePreprocessing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,11 @@ preprocessCode(const std::string& code, size_t startIndex,
instructions.emplace_back(i - subInstructions.size() - 1, line, a,
targets, trueStart, trueEnd, i + 1, false, "",
false, block);
auto& functionInstruction = instructions.back();
for (auto& instr : subInstructions) {
instructions.back().childInstructions.push_back(instr.lineNumber);
functionInstruction.childInstructions.push_back(instr.lineNumber);
instructions.push_back(std::move(instr));
}
std::move(subInstructions.begin(), subInstructions.end(),
std::back_inserter(instructions));

const auto closingBrace = code.find(
'}', instructions[instructions.size() - 1].originalCodeEndPosition);
Expand Down

0 comments on commit b3e8903

Please sign in to comment.