Skip to content

Commit

Permalink
minor code simpl
Browse files Browse the repository at this point in the history
  • Loading branch information
nunoplopes committed Jan 1, 2025
1 parent e23f505 commit 4521661
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ir/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1062,10 +1062,9 @@ State::addFnCall(const string &name, vector<StateValue> &&inputs,

assert(!noret || !willret);

bool all_valid = std::all_of(inputs.begin(), inputs.end(),
[](auto &v) { return v.isValid(); }) &&
std::all_of(ptr_inputs.begin(), ptr_inputs.end(),
[](auto &v) { return v.val.isValid(); });
bool all_valid
= ranges::all_of(inputs, [](auto &v) { return v.isValid(); }) &&
ranges::all_of(ptr_inputs, [](auto &v) { return v.val.isValid(); });

if (!all_valid) {
addUB(expr());
Expand Down

0 comments on commit 4521661

Please sign in to comment.