diff --git a/script/make-pretty b/script/make-pretty index 5150d54da..7d6061198 100755 --- a/script/make-pretty +++ b/script/make-pretty @@ -126,6 +126,7 @@ modernize-use-nullptr,\ readability-avoid-const-params-in-decls,\ readability-make-member-function-const,\ readability-simplify-boolean-expr,\ +readability-static-accessed-through-instance,\ " #performance-for-range-copy\ diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp index ec5b24ca2..cc981f71d 100644 --- a/src/core/mac/mac.cpp +++ b/src/core/mac/mac.cpp @@ -577,7 +577,7 @@ void Mac::RequestCslFrameTransmission(uint32_t aDelay) { VerifyOrExit(mEnabled); - mCslTxFireTime = mTimer.GetNow() + aDelay; + mCslTxFireTime = TimerMilli::GetNow() + aDelay; StartOperation(kOperationTransmitDataCsl); @@ -785,7 +785,7 @@ void Mac::PerformNextOperation(void) mOperation = kOperationWaitingForData; } #if OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE - else if (mPendingTransmitDataCsl && mTimer.GetNow() >= mCslTxFireTime) + else if (mPendingTransmitDataCsl && TimerMilli::GetNow() >= mCslTxFireTime) { mPendingTransmitDataCsl = false; mOperation = kOperationTransmitDataCsl; @@ -2456,7 +2456,7 @@ void Mac::UpdateFrameControlField(const Neighbor *aNeighbor, bool aIsTimeSync, u else #endif #if OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE - if (aNeighbor != nullptr && !Get().IsActiveRouter(aNeighbor->GetRloc16()) && + if (aNeighbor != nullptr && !Mle::MleRouter::IsActiveRouter(aNeighbor->GetRloc16()) && static_cast(aNeighbor)->IsCslSynchronized()) { aFcf |= Frame::kFcfFrameVersion2015; diff --git a/src/core/mac/sub_mac.cpp b/src/core/mac/sub_mac.cpp index 0bdf01c9c..3424f118d 100644 --- a/src/core/mac/sub_mac.cpp +++ b/src/core/mac/sub_mac.cpp @@ -940,7 +940,7 @@ void SubMac::SetCslPeriod(uint16_t aPeriod) if (mCslPeriod > 0) { - mCslSampleTime = mCslTimer.GetNow(); + mCslSampleTime = TimerMicro::GetNow(); Get().UpdateCslSampleTime(mCslSampleTime.GetValue()); mCslState = kCslSample; diff --git a/src/core/thread/mesh_forwarder_ftd.cpp b/src/core/thread/mesh_forwarder_ftd.cpp index 4601c7edc..a9055ac38 100644 --- a/src/core/thread/mesh_forwarder_ftd.cpp +++ b/src/core/thread/mesh_forwarder_ftd.cpp @@ -905,7 +905,7 @@ otError MeshForwarder::GetDestinationRlocByServiceAloc(uint16_t aServiceAloc, ui // Path cost curCost = Get().GetCost(server16); - if (!Get().IsActiveRouter(server16)) + if (!Mle::MleRouter::IsActiveRouter(server16)) { // Assume best link between remote child server and its parent. curCost += 1; @@ -918,7 +918,7 @@ otError MeshForwarder::GetDestinationRlocByServiceAloc(uint16_t aServiceAloc, ui { uint8_t cost; - if (!Get().IsActiveRouter(server16)) + if (!Mle::MleRouter::IsActiveRouter(server16)) { // Cost calculated only from Link Quality In as the parent only maintains // one-direction link info.