Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions include/xrpl/beast/container/detail/aged_unordered_container.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class AgedUnorderedContainer
{
}

value_type value;
value_type value{};
time_point when;
};

Expand Down Expand Up @@ -466,8 +466,8 @@ class AgedUnorderedContainer
{
// Need two vectors otherwise we
// will destroy non-empty buckets.
vec_type vec(vec_.get_allocator());
std::swap(vec_, vec);
vec_type tmp(vec_.get_allocator());
std::swap(tmp, vec_);
vec_.resize(count);
c.rehash(bucket_traits(&vec_[0], vec_.size()));
return;
Expand Down Expand Up @@ -498,7 +498,7 @@ class AgedUnorderedContainer

private:
float maxLoadFactor_;
vec_type vec_;
vec_type vec_{};
};

template <class... Args>
Expand Down Expand Up @@ -1455,7 +1455,7 @@ class AgedUnorderedContainer
private:
ConfigT config_;
Buckets buck_;
cont_type mutable cont_;
cont_type mutable cont_{};
};

//------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions include/xrpl/beast/rfc2616.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ class ListIterator
{
using iter_type = boost::string_ref::const_iterator;

iter_type it_;
iter_type end_;
iter_type it_{};
iter_type end_{};
boost::string_ref value_;

public:
Expand Down
1 change: 1 addition & 0 deletions include/xrpl/protocol/MultiApiJson.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace xrpl {

namespace detail {

template <typename T>
constexpr bool kIsIntegralConstant = false;
template <typename I, auto A>
Expand Down
4 changes: 2 additions & 2 deletions include/xrpl/server/detail/BaseHTTPPeer.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ class BaseHTTPPeer : public IOList::Work, public Session

boost::asio::streambuf readBuf_;
http_request_type message_;
std::vector<Buffer> wq_;
std::vector<Buffer> wq2_;
std::vector<Buffer> wq_{};
std::vector<Buffer> wq2_{};
std::mutex mutex_;
bool graceful_ = false;
bool complete_ = false;
Expand Down
2 changes: 1 addition & 1 deletion include/xrpl/server/detail/ServerImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class ServerImpl : public Server

std::mutex m_;
std::vector<Port> ports_;
std::vector<std::weak_ptr<Door<Handler>>> list_;
std::vector<std::weak_ptr<Door<Handler>>> list_{};
int high_ = 0;
std::array<std::size_t, 64> hist_{};

Expand Down
14 changes: 7 additions & 7 deletions src/xrpld/app/consensus/RCLCxPeerPos.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ class RCLCxPeerPos
/**
* Verify the signing hash of the proposal
*/
bool
[[nodiscard]] bool
checkSign() const;

/**
* Signature of the proposal (not necessarily verified)
*/
Slice
[[nodiscard]] Slice
signature() const
{
return {signature_.data(), signature_.size()};
Expand All @@ -64,7 +64,7 @@ class RCLCxPeerPos
/**
* Public key of peer that sent the proposal
*/
PublicKey const&
[[nodiscard]] PublicKey const&
publicKey() const
{
return publicKey_;
Expand All @@ -73,13 +73,13 @@ class RCLCxPeerPos
/**
* Unique id used by hash router to suppress duplicates
*/
uint256 const&
[[nodiscard]] uint256 const&
suppressionID() const
{
return suppression_;
}

Proposal const&
[[nodiscard]] Proposal const&
proposal() const
{
return proposal_;
Expand All @@ -88,10 +88,10 @@ class RCLCxPeerPos
/**
* JSON representation of proposal
*/
json::Value
[[nodiscard]] json::Value
getJson() const;

std::string
[[nodiscard]] std::string
render() const
{
return proposal_.render();
Expand Down
2 changes: 1 addition & 1 deletion src/xrpld/app/misc/NetworkOPs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ class NetworkOPsImp final : public NetworkOPs
SLastEntry // Any new entry must be ADDED ABOVE this one
};

std::array<SubMapType, SubTypes::SLastEntry> streamMaps_;
std::array<SubMapType, SubTypes::SLastEntry> streamMaps_{};

ServerFeeSummary lastFeeSummary_;

Expand Down
24 changes: 12 additions & 12 deletions src/xrpld/app/misc/Transaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,25 +75,25 @@ class Transaction : public std::enable_shared_from_this<Transaction>,
return transaction_;
}

uint256 const&
[[nodiscard]] uint256 const&
getID() const
{
return transactionID_;
}

LedgerIndex
[[nodiscard]] LedgerIndex
getLedger() const
{
return ledgerIndex_;
}

bool
[[nodiscard]] bool
isValidated() const
{
return ledgerIndex_ != 0;
}

TransStatus
[[nodiscard]] TransStatus
getStatus() const
{
return status_;
Expand Down Expand Up @@ -146,7 +146,7 @@ class Transaction : public std::enable_shared_from_this<Transaction>,
*
* @return Whether transaction is being applied within a batch.
*/
bool
[[nodiscard]] bool
getApplying() const
{
// Note that all access to applying_ are made by NetworkOPsImp, and must
Expand Down Expand Up @@ -199,7 +199,7 @@ class Transaction : public std::enable_shared_from_this<Transaction>,
* @brief getSubmitResult Return submit result
* @return SubmitResult struct
*/
SubmitResult
[[nodiscard]] SubmitResult
getSubmitResult() const
{
return submitResult_;
Expand Down Expand Up @@ -276,7 +276,7 @@ class Transaction : public std::enable_shared_from_this<Transaction>,
* @brief getCurrentLedgerState Get current ledger state of transaction
* @return Current ledger state
*/
std::optional<CurrentLedgerState>
[[nodiscard]] std::optional<CurrentLedgerState>
getCurrentLedgerState() const
{
return currentLedgerState_;
Expand All @@ -299,7 +299,7 @@ class Transaction : public std::enable_shared_from_this<Transaction>,
currentLedgerState_.emplace(validatedLedger, fee, accountSeq, availableSeq);
}

json::Value
[[nodiscard]] json::Value
getJson(JsonOptions options, bool binary = false) const;

// Information used to locate a transaction.
Expand Down Expand Up @@ -328,8 +328,8 @@ class Transaction : public std::enable_shared_from_this<Transaction>,
*
* @throws if isFound() returns false
*/
uint256 const&
getNodestoreHash()
[[nodiscard]] uint256 const&
getNodestoreHash() const
{
return std::get<std::pair<uint256, uint32_t>>(locator).first;
}
Expand All @@ -339,8 +339,8 @@ class Transaction : public std::enable_shared_from_this<Transaction>,
*
* @throws if isFound() returns false
*/
uint32_t
getLedgerSequence()
[[nodiscard]] uint32_t
getLedgerSequence() const
{
return std::get<std::pair<uint256, uint32_t>>(locator).second;
}
Expand Down
Loading