mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 23:24:39 +00:00
Use a for-in loop in function.cpp
This commit is contained in:
parent
de23ce6ac1
commit
2fa705e4b2
1 changed files with 2 additions and 3 deletions
|
@ -157,9 +157,8 @@ void function_add(const function_data_t &data, const parser_t &parser) {
|
|||
loaded_functions.insert(new_pair);
|
||||
|
||||
// Add event handlers.
|
||||
for (std::vector<event_t>::const_iterator iter = data.events.begin(); iter != data.events.end();
|
||||
++iter) {
|
||||
event_add_handler(*iter);
|
||||
for (const event_t &event : data.events) {
|
||||
event_add_handler(event);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue