diff options
| author | Mark Rowe <mark@vector35.com> | 2025-12-10 15:20:25 -0800 |
|---|---|---|
| committer | Mark Rowe <mark@vector35.com> | 2025-12-15 20:25:23 -0800 |
| commit | 95b849d05d05ae9e55eb839508536d5af314d331 (patch) | |
| tree | f06fc6ea5c13cc4972fe8b9fdd5c30d94779b045 /lowlevelilinstruction.cpp | |
| parent | 2f1150703636b2b06d84bb66853fce7382bf6f29 (diff) | |
Use bn::base::function_ref instead of std::function for parameters that are not stored
This avoids the overhead of constructing a `std::function`, which may
require a heap allocation, when calling functions that immediately
invokes a function object.
Diffstat (limited to 'lowlevelilinstruction.cpp')
| -rw-r--r-- | lowlevelilinstruction.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lowlevelilinstruction.cpp b/lowlevelilinstruction.cpp index 036ef093..975720c1 100644 --- a/lowlevelilinstruction.cpp +++ b/lowlevelilinstruction.cpp @@ -1885,7 +1885,7 @@ void LowLevelILInstructionBase::ClearAttribute(BNILInstructionAttribute attribut } -void LowLevelILInstruction::VisitExprs(const std::function<bool(const LowLevelILInstruction& expr)>& func) const +void LowLevelILInstruction::VisitExprs(bn::base::function_ref<bool(const LowLevelILInstruction& expr)> func) const { if (!func(*this)) return; @@ -2096,7 +2096,7 @@ ExprId LowLevelILInstruction::CopyTo(LowLevelILFunction* dest, const ILSourceLoc ExprId LowLevelILInstruction::CopyTo( - LowLevelILFunction* dest, const std::function<ExprId(const LowLevelILInstruction& subExpr)>& subExprHandler, const ILSourceLocation& sourceLocation) const + LowLevelILFunction* dest, bn::base::function_ref<ExprId(const LowLevelILInstruction& subExpr)> subExprHandler, const ILSourceLocation& sourceLocation) const { vector<ExprId> params; BNLowLevelILLabel* labelA; |
