mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +00:00
AK+Kernel+LibELF: Remove the need for IteratorDecision::Continue
By constraining two implementations, the compiler will select the best fitting one. All this will require is duplicating the implementation and simplifying for the `void` case. This constraining also informs both the caller and compiler by passing the callback parameter types as part of the constraint (e.g.: `IterationFunction<int>`). Some `for_each` functions in LibELF only take functions which return `void`. This is a minimal correctness check, as it removes one way for a function to incompletely do something. There seems to be a possible idiom where inside a lambda, a `return;` is the same as `continue;` in a for-loop.
This commit is contained in:
@@ -286,7 +286,6 @@ void TTY::generate_signal(int signal)
|
||||
dbgln_if(TTY_DEBUG, "{}: Send signal {} to {}", tty_name(), signal, process);
|
||||
// FIXME: Should this error be propagated somehow?
|
||||
[[maybe_unused]] auto rc = process.send_signal(signal, nullptr);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user