mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 23:13:34 +08:00
Scope hiding fixes
This commit is contained in:
@@ -40,7 +40,7 @@ bool DeadlineHandler::isRunning() const
|
||||
struct MonotonicDeadlineHandlerInsertionComparator
|
||||
{
|
||||
const MonotonicTime ts;
|
||||
explicit MonotonicDeadlineHandlerInsertionComparator(MonotonicTime ts) : ts(ts) { }
|
||||
explicit MonotonicDeadlineHandlerInsertionComparator(MonotonicTime arg_ts) : ts(arg_ts) { }
|
||||
bool operator()(const DeadlineHandler* t) const
|
||||
{
|
||||
return t->getDeadline() > ts;
|
||||
|
||||
@@ -50,8 +50,8 @@ int GlobalTimeSyncMaster::IfaceMaster::publish(TransferID tid, MonotonicTime cur
|
||||
assert(pub_.getTransferSender()->getCanIOFlags() == CanIOFlagLoopback);
|
||||
assert(pub_.getTransferSender()->getIfaceMask() == (1 << iface_index_));
|
||||
|
||||
const MonotonicDuration since_prev_pub = current_time - prev_pub_mono_;
|
||||
prev_pub_mono_ = current_time;
|
||||
const MonotonicDuration since_prev_pub = current_time - iface_prev_pub_mono_;
|
||||
iface_prev_pub_mono_ = current_time;
|
||||
assert(since_prev_pub.isPositive());
|
||||
const bool long_period = since_prev_pub.toMSec() >= protocol::GlobalTimeSync::MAX_PUBLICATION_PERIOD_MS;
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ bool TransferListenerBase::TimedOutReceiverPredicate::operator()(const TransferB
|
||||
* destroy the buffers manually.
|
||||
* Maybe it is not good that the predicate has side effects, but I ran out of better ideas.
|
||||
*/
|
||||
bufmgr_.remove(key);
|
||||
parent_bufmgr_.remove(key);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user