mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-24 16:19:13 +08:00
Use a for-in loop in function.cpp
This commit is contained in:
parent
de23ce6ac1
commit
2fa705e4b2
|
@ -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 New Issue
Block a user