Skip to content

Commit 4521661

Browse files
committed
minor code simpl
1 parent e23f505 commit 4521661

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ir/state.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,10 +1062,9 @@ State::addFnCall(const string &name, vector<StateValue> &&inputs,
10621062

10631063
assert(!noret || !willret);
10641064

1065-
bool all_valid = std::all_of(inputs.begin(), inputs.end(),
1066-
[](auto &v) { return v.isValid(); }) &&
1067-
std::all_of(ptr_inputs.begin(), ptr_inputs.end(),
1068-
[](auto &v) { return v.val.isValid(); });
1065+
bool all_valid
1066+
= ranges::all_of(inputs, [](auto &v) { return v.isValid(); }) &&
1067+
ranges::all_of(ptr_inputs, [](auto &v) { return v.val.isValid(); });
10691068

10701069
if (!all_valid) {
10711070
addUB(expr());

0 commit comments

Comments
 (0)