mirror of
https://github.com/espressif/openthread.git
synced 2026-07-08 13:20:25 +00:00
[instance-locator] use instance reference instead of pointer (#2007)
This commit changes the `InstanceLocator` class to keep track of a reference to `otInstance` (instead of a pointer) to make it behave similar to other `ObjectLocator` classes. The method `GetInstance()` in all locator objects is updated to provide a reference (instead of a pointer) to `otInstance`. The logging macros are updated such that a reference to `otInstance` is passed as the first argument (with the exception of `otLog<Level>Plat()` macros which are used by platform code in C domain). The documentation for log macros are also updated.
This commit is contained in:
committed by
Jonathan Hui
parent
ea73c92151
commit
fc72e4e719
+1
-1
@@ -244,7 +244,7 @@ Interpreter::Interpreter(otInstance *aInstance):
|
||||
mLength(8),
|
||||
mCount(1),
|
||||
mInterval(1000),
|
||||
mPingTimer(aInstance, &Interpreter::s_HandlePingTimer, this),
|
||||
mPingTimer(*aInstance, &Interpreter::s_HandlePingTimer, this),
|
||||
#if OPENTHREAD_ENABLE_DNS_CLIENT
|
||||
mResolvingInProgress(0),
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user