Remove using namespace declarations at namespace scope in headers

This commit is contained in:
Scott Schurr
2018-08-03 11:42:39 -07:00
committed by seelabs
parent 4aa0bc37c0
commit 2901577be7
30 changed files with 74 additions and 38 deletions

View File

@@ -393,8 +393,6 @@ struct Peer
Ledger const*
acquireLedger(Ledger::ID const& ledgerID)
{
using namespace std::chrono;
auto it = ledgers.find(ledgerID);
if (it != ledgers.end())
return &(it->second);
@@ -411,7 +409,7 @@ struct Peer
return nullptr;
}
using namespace std::chrono_literals;
SimDuration minDuration{10s};
for (auto const& link : net.links(this))
{
@@ -457,6 +455,7 @@ struct Peer
return nullptr;
}
using namespace std::chrono_literals;
SimDuration minDuration{10s};
for (auto const& link : net.links(this))
{

View File

@@ -101,6 +101,7 @@ LedgerOracle::accept(
NetClock::duration closeTimeResolution,
NetClock::time_point const& consensusCloseTime)
{
using namespace std::chrono_literals;
Ledger::Instance next(*parent.instance_);
next.txs.insert(txs.begin(), txs.end());
next.seq = parent.seq() + Ledger::Seq{1};

View File

@@ -45,12 +45,12 @@ class HeartbeatTimer
public:
HeartbeatTimer(
Scheduler& sched,
SimDuration interval = std::chrono::seconds(60s),
std::ostream& out = std::cerr)
: scheduler_{sched}, interval_{interval}, out_{out},
startRealTime_{RealClock::now()},
startSimTime_{sched.now()}
Scheduler& sched,
SimDuration interval = std::chrono::seconds {60},
std::ostream& out = std::cerr)
: scheduler_{sched}, interval_{interval}, out_{out},
startRealTime_{RealClock::now()},
startSimTime_{sched.now()}
{
}