[clang-tidy] readability-static-accessed-through-instance (#5771)

This commit is contained in:
Jonathan Hui
2020-11-05 10:18:11 -08:00
committed by GitHub
parent d5ee7ddbd4
commit c35ccd83bb
4 changed files with 7 additions and 6 deletions
+1
View File
@@ -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\
+3 -3
View File
@@ -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<Mle::MleRouter>().IsActiveRouter(aNeighbor->GetRloc16()) &&
if (aNeighbor != nullptr && !Mle::MleRouter::IsActiveRouter(aNeighbor->GetRloc16()) &&
static_cast<const Child *>(aNeighbor)->IsCslSynchronized())
{
aFcf |= Frame::kFcfFrameVersion2015;
+1 -1
View File
@@ -940,7 +940,7 @@ void SubMac::SetCslPeriod(uint16_t aPeriod)
if (mCslPeriod > 0)
{
mCslSampleTime = mCslTimer.GetNow();
mCslSampleTime = TimerMicro::GetNow();
Get<Radio>().UpdateCslSampleTime(mCslSampleTime.GetValue());
mCslState = kCslSample;
+2 -2
View File
@@ -905,7 +905,7 @@ otError MeshForwarder::GetDestinationRlocByServiceAloc(uint16_t aServiceAloc, ui
// Path cost
curCost = Get<Mle::MleRouter>().GetCost(server16);
if (!Get<Mle::MleRouter>().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<Mle::MleRouter>().IsActiveRouter(server16))
if (!Mle::MleRouter::IsActiveRouter(server16))
{
// Cost calculated only from Link Quality In as the parent only maintains
// one-direction link info.