Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
SoniEx2 committed Oct 7, 2024
1 parent bad5d49 commit 49cb92f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/interp/interp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,8 @@ void Thread::SetRef(Index index) {
assert(index > 0 && index <= values_.size());
Index slot = values_.size() - index;
// keep refs_ ordered!
auto it = std::find_if(refs_.rbegin(), refs_.rend(), [slot](u32 x) { return x <= slot; });
auto it = std::find_if(refs_.rbegin(), refs_.rend(),
[slot](u32 x) { return x <= slot; });
if (it == refs_.rend() || *it != slot) {
refs_.insert(it.base(), slot);
}
Expand Down

0 comments on commit 49cb92f

Please sign in to comment.