mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-20 19:56:00 +00:00
style: clang-tidy auto fixes (#1730)
Fixes #1729. Please review and commit clang-tidy fixes. Co-authored-by: kuznetsss <15742918+kuznetsss@users.noreply.github.com>
This commit is contained in:
committed by
Alex Kremer
parent
fb98a6a394
commit
e38658a0d6
@@ -575,7 +575,7 @@ public:
|
|||||||
|
|
||||||
auto mptObjects = doFetchLedgerObjects(mptKeys, ledgerSequence, yield);
|
auto mptObjects = doFetchLedgerObjects(mptKeys, ledgerSequence, yield);
|
||||||
|
|
||||||
auto it = std::remove_if(mptObjects.begin(), mptObjects.end(), [](Blob const& mpt) { return mpt.size() == 0; });
|
auto it = std::remove_if(mptObjects.begin(), mptObjects.end(), [](Blob const& mpt) { return mpt.empty(); });
|
||||||
|
|
||||||
mptObjects.erase(it, mptObjects.end());
|
mptObjects.erase(it, mptObjects.end());
|
||||||
|
|
||||||
@@ -948,7 +948,8 @@ public:
|
|||||||
writeMPTHolders(std::vector<MPTHolderData> const& data) override
|
writeMPTHolders(std::vector<MPTHolderData> const& data) override
|
||||||
{
|
{
|
||||||
std::vector<Statement> statements;
|
std::vector<Statement> statements;
|
||||||
for (auto [mptId, holder] : data)
|
statements.reserve(data.size());
|
||||||
|
for (auto [mptId, holder] : data)
|
||||||
statements.push_back(schema_->insertMPTHolder.bind(std::move(mptId), std::move(holder)));
|
statements.push_back(schema_->insertMPTHolder.bind(std::move(mptId), std::move(holder)));
|
||||||
|
|
||||||
executor_.write(std::move(statements));
|
executor_.write(std::move(statements));
|
||||||
|
|||||||
@@ -17,16 +17,21 @@
|
|||||||
*/
|
*/
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
||||||
#include "data/BackendInterface.hpp"
|
|
||||||
#include "data/DBHelpers.hpp"
|
#include "data/DBHelpers.hpp"
|
||||||
#include "data/Types.hpp"
|
|
||||||
|
|
||||||
#include <fmt/core.h>
|
|
||||||
#include <ripple/protocol/STBase.h>
|
#include <ripple/protocol/STBase.h>
|
||||||
#include <ripple/protocol/STTx.h>
|
#include <ripple/protocol/STTx.h>
|
||||||
#include <ripple/protocol/TxMeta.h>
|
#include <ripple/protocol/TxMeta.h>
|
||||||
|
#include <xrpl/basics/base_uint.h>
|
||||||
|
#include <xrpl/protocol/LedgerFormats.h>
|
||||||
|
#include <xrpl/protocol/SField.h>
|
||||||
|
#include <xrpl/protocol/STLedgerEntry.h>
|
||||||
|
#include <xrpl/protocol/STObject.h>
|
||||||
|
#include <xrpl/protocol/TER.h>
|
||||||
|
#include <xrpl/protocol/TxFormats.h>
|
||||||
|
|
||||||
#include <vector>
|
#include <optional>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
namespace etl {
|
namespace etl {
|
||||||
|
|
||||||
|
|||||||
@@ -81,6 +81,7 @@
|
|||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <cassert>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|||||||
@@ -24,17 +24,18 @@
|
|||||||
#include "rpc/RPCHelpers.hpp"
|
#include "rpc/RPCHelpers.hpp"
|
||||||
#include "rpc/common/Types.hpp"
|
#include "rpc/common/Types.hpp"
|
||||||
|
|
||||||
|
#include <boost/json/array.hpp>
|
||||||
#include <boost/json/conversion.hpp>
|
#include <boost/json/conversion.hpp>
|
||||||
#include <boost/json/object.hpp>
|
#include <boost/json/object.hpp>
|
||||||
#include <boost/json/value.hpp>
|
#include <boost/json/value.hpp>
|
||||||
#include <ripple/basics/base_uint.h>
|
#include <ripple/basics/base_uint.h>
|
||||||
#include <ripple/basics/strHex.h>
|
#include <ripple/basics/strHex.h>
|
||||||
#include <ripple/protocol/AccountID.h>
|
#include <ripple/protocol/AccountID.h>
|
||||||
#include <ripple/protocol/ErrorCodes.h>
|
|
||||||
#include <ripple/protocol/Indexes.h>
|
#include <ripple/protocol/Indexes.h>
|
||||||
#include <ripple/protocol/LedgerHeader.h>
|
#include <ripple/protocol/LedgerHeader.h>
|
||||||
#include <ripple/protocol/jss.h>
|
#include <ripple/protocol/jss.h>
|
||||||
#include <ripple/protocol/nft.h>
|
#include <xrpl/protocol/SField.h>
|
||||||
|
#include <xrpl/protocol/STLedgerEntry.h>
|
||||||
|
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <string>
|
#include <string>
|
||||||
@@ -73,7 +74,7 @@ MPTHoldersHandler::process(MPTHoldersHandler::Input input, Context const& ctx) c
|
|||||||
output.limit = limit;
|
output.limit = limit;
|
||||||
output.ledgerIndex = lgrInfo.seq;
|
output.ledgerIndex = lgrInfo.seq;
|
||||||
|
|
||||||
boost::json::array mpts;
|
boost::json::array const mpts;
|
||||||
for (auto const& mpt : dbResponse.mptokens) {
|
for (auto const& mpt : dbResponse.mptokens) {
|
||||||
ripple::STLedgerEntry const sle{ripple::SerialIter{mpt.data(), mpt.size()}, keylet::mptIssuance(mptID).key};
|
ripple::STLedgerEntry const sle{ripple::SerialIter{mpt.data(), mpt.size()}, keylet::mptIssuance(mptID).key};
|
||||||
boost::json::object mptJson;
|
boost::json::object mptJson;
|
||||||
|
|||||||
@@ -1135,7 +1135,7 @@ CreateMPTokenObject(std::string_view accountId, ripple::uint192 issuanceID, std:
|
|||||||
mptoken.setFieldH256(ripple::sfPreviousTxnID, ripple::uint256{});
|
mptoken.setFieldH256(ripple::sfPreviousTxnID, ripple::uint256{});
|
||||||
mptoken.setFieldU32(ripple::sfPreviousTxnLgrSeq, 0);
|
mptoken.setFieldU32(ripple::sfPreviousTxnLgrSeq, 0);
|
||||||
|
|
||||||
if (mptAmount)
|
if (mptAmount != 0u)
|
||||||
mptoken.setFieldU64(ripple::sfMPTAmount, mptAmount);
|
mptoken.setFieldU64(ripple::sfMPTAmount, mptAmount);
|
||||||
|
|
||||||
return mptoken;
|
return mptoken;
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
#include <xrpl/basics/base_uint.h>
|
#include <xrpl/basics/base_uint.h>
|
||||||
#include <xrpl/protocol/AccountID.h>
|
#include <xrpl/protocol/AccountID.h>
|
||||||
|
#include <xrpl/protocol/Indexes.h>
|
||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include <ripple/basics/base_uint.h>
|
#include <ripple/basics/base_uint.h>
|
||||||
#include <ripple/protocol/Indexes.h>
|
#include <ripple/protocol/Indexes.h>
|
||||||
#include <ripple/protocol/LedgerHeader.h>
|
#include <ripple/protocol/LedgerHeader.h>
|
||||||
|
#include <xrpl/basics/strHex.h>
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
|
|||||||
Reference in New Issue
Block a user