make format

pull/1001/head
Jeff Becker 4 years ago
parent 013a312363
commit 8b8d636ded
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -340,11 +340,13 @@ namespace llarp
void
Context::handle_explore_timer(uint64_t interval)
{
const auto num =
std::min(router->NumberOfConnectedRouters(), size_t(4));
const auto num = std::min(router->NumberOfConnectedRouters(), size_t(4));
if(num)
Explore(num);
router->logic()->call_later(interval, std::bind(&llarp::dht::Context::handle_explore_timer, this, interval));
router->logic()->call_later(
interval,
std::bind(&llarp::dht::Context::handle_explore_timer, this,
interval));
}
void
@ -519,8 +521,10 @@ namespace llarp
llarp::LogDebug("initialize dht with key ", ourKey);
// start exploring
r->logic()->call_later(exploreInterval,
std::bind(&llarp::dht::Context::handle_explore_timer, this, exploreInterval));
r->logic()->call_later(
exploreInterval,
std::bind(&llarp::dht::Context::handle_explore_timer, this,
exploreInterval));
// start cleanup timer
ScheduleCleanupTimer();
}
@ -528,7 +532,9 @@ namespace llarp
void
Context::ScheduleCleanupTimer()
{
router->logic()->call_later(1000, std::bind(&llarp::dht::Context::handle_cleaner_timer, this, 1000));
router->logic()->call_later(
1000,
std::bind(&llarp::dht::Context::handle_cleaner_timer, this, 1000));
}
void

@ -669,7 +669,8 @@ namespace llarp
#ifdef _WIN32
struct llarp_fd_promise
{
void Set(std::pair< int, int >)
void
Set(std::pair< int, int >)
{
}

@ -802,7 +802,11 @@ namespace libuv
loop->process_cancel_queue();
}
Loop::Loop() : llarp_ev_loop(), m_LogicCalls(1024), m_timerQueue(20), m_timerCancelQueue(20)
Loop::Loop()
: llarp_ev_loop()
, m_LogicCalls(1024)
, m_timerQueue(20)
, m_timerCancelQueue(20)
{
}

@ -462,8 +462,8 @@ namespace llarp
void
ILinkLayer::ScheduleTick(uint64_t interval)
{
tick_id = m_Logic->call_later(interval,
std::bind(&ILinkLayer::OnTick, this));
tick_id =
m_Logic->call_later(interval, std::bind(&ILinkLayer::OnTick, this));
}
void

@ -207,7 +207,6 @@ namespace llarp
}
private:
void
OnTick();

@ -199,15 +199,15 @@ namespace llarp
}
/// override me in subtype
virtual bool HandleGotIntroMessage(
std::shared_ptr< const dht::GotIntroMessage >)
virtual bool
HandleGotIntroMessage(std::shared_ptr< const dht::GotIntroMessage >)
{
return false;
}
/// override me in subtype
virtual bool HandleGotRouterMessage(
std::shared_ptr< const dht::GotRouterMessage >)
virtual bool
HandleGotRouterMessage(std::shared_ptr< const dht::GotRouterMessage >)
{
return false;
}

@ -65,8 +65,7 @@ namespace llarp
return m_CachedAddr.ToString();
}
bool
ServiceInfo::CalculateAddress(std::array< byte_t, 32 >& data) const
bool ServiceInfo::CalculateAddress(std::array< byte_t, 32 >& data) const
{
std::array< byte_t, 256 > tmp;
llarp_buffer_t buf(tmp);

@ -97,8 +97,7 @@ namespace llarp
}
/// calculate our address
bool
CalculateAddress(std::array< byte_t, 32 >& data) const;
bool CalculateAddress(std::array< byte_t, 32 >& data) const;
bool
BDecode(llarp_buffer_t* buf)

@ -36,7 +36,9 @@ namespace llarp
struct alignas(std::max_align_t) AlignedBuffer
#endif
{
static_assert(sz >= 8, "AlignedBuffer cannot be used with buffers smaller than 8 bytes");
static_assert(sz >= 8,
"AlignedBuffer cannot be used with buffers smaller than 8 "
"bytes");
static constexpr size_t SIZE = sz;

Loading…
Cancel
Save