mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Mark some single-argument constructors explicit
This commit is contained in:
@@ -98,7 +98,7 @@ public:
|
||||
Collector::ptr m_collector;
|
||||
Items m_items;
|
||||
|
||||
GroupsImp (Collector::ptr const& collector)
|
||||
explicit GroupsImp (Collector::ptr const& collector)
|
||||
: m_collector (collector)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ private:
|
||||
sys_seconds sent;
|
||||
std::uint32_t nonce;
|
||||
|
||||
Query (sys_seconds j = sys_seconds::max())
|
||||
explicit Query (sys_seconds j = sys_seconds::max())
|
||||
: replied (false)
|
||||
, sent (j)
|
||||
{
|
||||
|
||||
@@ -327,7 +327,7 @@ struct transactionPreProcessResult
|
||||
, second ()
|
||||
{ }
|
||||
|
||||
transactionPreProcessResult (std::shared_ptr<STTx>&& st)
|
||||
explicit transactionPreProcessResult (std::shared_ptr<STTx>&& st)
|
||||
: first ()
|
||||
, second (std::move (st))
|
||||
{ }
|
||||
|
||||
@@ -49,7 +49,7 @@ create (jtx::Account const& account,
|
||||
struct DeliverMin
|
||||
{
|
||||
STAmount value;
|
||||
DeliverMin (STAmount const& deliverMin)
|
||||
explicit DeliverMin (STAmount const& deliverMin)
|
||||
: value (deliverMin) { }
|
||||
};
|
||||
|
||||
@@ -101,7 +101,7 @@ private:
|
||||
std::uint32_t const expry_;
|
||||
|
||||
public:
|
||||
expiration (NetClock::time_point const& expiry)
|
||||
explicit expiration (NetClock::time_point const& expiry)
|
||||
: expry_{expiry.time_since_epoch().count()}
|
||||
{
|
||||
}
|
||||
@@ -120,7 +120,7 @@ private:
|
||||
std::uint32_t const tag_;
|
||||
|
||||
public:
|
||||
source_tag (std::uint32_t tag)
|
||||
explicit source_tag (std::uint32_t tag)
|
||||
: tag_{tag}
|
||||
{
|
||||
}
|
||||
@@ -139,7 +139,7 @@ private:
|
||||
std::uint32_t const tag_;
|
||||
|
||||
public:
|
||||
dest_tag (std::uint32_t tag)
|
||||
explicit dest_tag (std::uint32_t tag)
|
||||
: tag_{tag}
|
||||
{
|
||||
}
|
||||
@@ -158,7 +158,7 @@ private:
|
||||
uint256 const id_;
|
||||
|
||||
public:
|
||||
invoice_id (uint256 const& id)
|
||||
explicit invoice_id (uint256 const& id)
|
||||
: id_{id}
|
||||
{
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ struct Escrow_test : public beast::unit_test::suite
|
||||
}
|
||||
|
||||
template <size_t N>
|
||||
condition (std::array<std::uint8_t, N> c)
|
||||
explicit condition (std::array<std::uint8_t, N> c)
|
||||
: condition(makeSlice(c))
|
||||
{
|
||||
}
|
||||
@@ -152,7 +152,7 @@ struct Escrow_test : public beast::unit_test::suite
|
||||
}
|
||||
|
||||
template <size_t N>
|
||||
fulfillment (std::array<std::uint8_t, N> f)
|
||||
explicit fulfillment (std::array<std::uint8_t, N> f)
|
||||
: fulfillment(makeSlice(f))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -363,7 +363,7 @@ struct ExistingElementPool
|
||||
ExistingElementPool& p_;
|
||||
ResetState state_;
|
||||
|
||||
StateGuard(ExistingElementPool& p) : p_{p}, state_{p.getResetState()}
|
||||
explicit StateGuard(ExistingElementPool& p) : p_{p}, state_{p.getResetState()}
|
||||
{
|
||||
}
|
||||
~StateGuard()
|
||||
|
||||
@@ -244,7 +244,7 @@ class Validations_test : public beast::unit_test::suite
|
||||
PeerID nextNodeId_{0};
|
||||
|
||||
public:
|
||||
TestHarness(LedgerOracle& o)
|
||||
explicit TestHarness(LedgerOracle& o)
|
||||
: tv_(p_, clock_, staleData_, clock_, o)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -400,7 +400,7 @@ class Stoppable_test
|
||||
C c_;
|
||||
Stoppable_test& test_;
|
||||
public:
|
||||
Root(Stoppable_test& test)
|
||||
explicit Root(Stoppable_test& test)
|
||||
: RootStoppable("R")
|
||||
, a_(&A::run, std::make_unique<A>(*this, test))
|
||||
, b_(*this, test)
|
||||
|
||||
@@ -36,7 +36,7 @@ private:
|
||||
class CerrRedirect
|
||||
{
|
||||
public:
|
||||
CerrRedirect (std::stringstream& sStream)
|
||||
explicit CerrRedirect (std::stringstream& sStream)
|
||||
: old_ (std::cerr.rdbuf (sStream.rdbuf()))
|
||||
{ }
|
||||
|
||||
@@ -53,7 +53,7 @@ private:
|
||||
class ThreadNameGuard
|
||||
{
|
||||
public:
|
||||
ThreadNameGuard (std::string const& newName)
|
||||
explicit ThreadNameGuard (std::string const& newName)
|
||||
: old_ (beast::getCurrentThreadName ())
|
||||
{
|
||||
beast::setCurrentThreadName (newName);
|
||||
|
||||
@@ -87,7 +87,7 @@ private:
|
||||
Base& base_;
|
||||
|
||||
public:
|
||||
Child(Base& base)
|
||||
explicit Child(Base& base)
|
||||
: base_(base)
|
||||
{
|
||||
}
|
||||
@@ -179,7 +179,7 @@ private:
|
||||
socket_type socket_;
|
||||
strand_type strand_;
|
||||
|
||||
Acceptor(Server& server)
|
||||
explicit Acceptor(Server& server)
|
||||
: Child(server)
|
||||
, server_(server)
|
||||
, test_(server_.test_)
|
||||
@@ -368,7 +368,7 @@ private:
|
||||
};
|
||||
|
||||
public:
|
||||
Server(short_read_test& test)
|
||||
explicit Server(short_read_test& test)
|
||||
: test_(test)
|
||||
{
|
||||
auto const p = std::make_shared<Acceptor>(*this);
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
beast::unit_test::suite& suite_;
|
||||
|
||||
public:
|
||||
TestSink (beast::unit_test::suite& suite)
|
||||
explicit TestSink (beast::unit_test::suite& suite)
|
||||
: Sink (beast::severities::kWarning, false)
|
||||
, suite_ (suite)
|
||||
{
|
||||
@@ -396,7 +396,7 @@ public:
|
||||
std::string& result_;
|
||||
|
||||
public:
|
||||
CaptureLogs(std::string& result)
|
||||
explicit CaptureLogs(std::string& result)
|
||||
: Logs (beast::severities::kInfo)
|
||||
, result_(result)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user