| 412 | } |
| 413 | |
| 414 | void event::remove_ref(client_t _client, bool _is_provided) { |
| 415 | |
| 416 | std::scoped_lock its_lock(refs_mutex_); |
| 417 | auto its_client = refs_.find(_client); |
| 418 | if (its_client != refs_.end()) { |
| 419 | auto its_provided = its_client->second.find(_is_provided); |
| 420 | if (its_provided != its_client->second.end()) { |
| 421 | its_provided->second--; |
| 422 | if (0 == its_provided->second) { |
| 423 | its_client->second.erase(_is_provided); |
| 424 | if (0 == its_client->second.size()) { |
| 425 | refs_.erase(_client); |
| 426 | } |
| 427 | } |
| 428 | } |
| 429 | } |
| 430 | } |
| 431 | |
| 432 | bool event::has_ref() { |
| 433 |
no test coverage detected