| 43 | } |
| 44 | |
| 45 | int add(Fn fn, void* arg) { |
| 46 | try { |
| 47 | if (_fns.capacity() < 16) { |
| 48 | _fns.reserve(16); |
| 49 | } |
| 50 | _fns.emplace_back(fn, arg); |
| 51 | } catch (...) { |
| 52 | errno = ENOMEM; |
| 53 | return -1; |
| 54 | } |
| 55 | return 0; |
| 56 | } |
| 57 | |
| 58 | void remove(Fn fn, void* arg) { |
| 59 | std::vector<Pair>::iterator |
no test coverage detected