| 442 | } |
| 443 | |
| 444 | bool Scheduler::isScheduled(std::string_view key, const void* target) const |
| 445 | { |
| 446 | AXASSERT(!key.empty(), "Argument key must not be empty"); |
| 447 | AXASSERT(target, "Argument target must be non-nullptr"); |
| 448 | |
| 449 | auto timerIt = _timersMap.find(const_cast<void*>(target)); |
| 450 | |
| 451 | if (timerIt == _timersMap.end()) |
| 452 | return false; |
| 453 | |
| 454 | auto&& timers = timerIt->second.timers; |
| 455 | const bool found = !timers.empty() && std::find_if(timers.begin(), timers.end(), [&key](Timer* const itimer) { |
| 456 | auto timer = dynamic_cast<TimerTargetCallback*>(itimer); |
| 457 | return (timer && !timer->isExhausted() && key == timer->getKey()); |
| 458 | }) != timers.end(); |
| 459 | |
| 460 | return found; |
| 461 | } |
| 462 | |
| 463 | void Scheduler::unscheduleUpdate(void* target) |
| 464 | { |
nothing calls this directly
no test coverage detected