[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:
Simon Lin
2021-02-04 21:29:43 -08:00
committed by GitHub
parent ba9381649d
commit 9fb778089b
54 changed files with 135 additions and 197 deletions
+2 -2
View File
@@ -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)