mirror of
https://github.com/espressif/openthread.git
synced 2026-08-16 15:47:46 +00:00
[locator] remove OwnerLocator class (#6138)
This commit removes the OwnerLocator class since it's actually useless. Timer and Tasklet inherited from OwnerLocator to so that they can use GetOwner<Type>() to find the owner object. However, these two classes already inherited from InstanceLocator, thus can use Get<Type>() to get any component of the OT instance.
This commit is contained in:
@@ -43,7 +43,7 @@ namespace ot {
|
||||
|
||||
Notifier::Notifier(Instance &aInstance)
|
||||
: InstanceLocator(aInstance)
|
||||
, mTask(aInstance, Notifier::EmitEvents, this)
|
||||
, mTask(aInstance, Notifier::EmitEvents)
|
||||
{
|
||||
for (ExternalCallback &callback : mExternalCallbacks)
|
||||
{
|
||||
@@ -117,7 +117,7 @@ void Notifier::SignalIfFirst(Event aEvent)
|
||||
|
||||
void Notifier::EmitEvents(Tasklet &aTasklet)
|
||||
{
|
||||
aTasklet.GetOwner<Notifier>().EmitEvents();
|
||||
aTasklet.Get<Notifier>().EmitEvents();
|
||||
}
|
||||
|
||||
void Notifier::EmitEvents(void)
|
||||
|
||||
Reference in New Issue
Block a user