mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
Fix MSVC build: Get the intended const& for some fields
- Also make MPTID more consistent
This commit is contained in:
@@ -61,7 +61,8 @@ using NodeID = base_uint<160, detail::NodeIDTag>;
|
||||
/** MPTID is a 192-bit value representing MPT Issuance ID,
|
||||
* which is a concatenation of a 32-bit sequence (big endian)
|
||||
* and a 160-bit account */
|
||||
using MPTID = base_uint<192>;
|
||||
// TODO - edhennis - Add a tag
|
||||
using MPTID = uint192;
|
||||
|
||||
/** XRP currency. */
|
||||
Currency const&
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace ripple {
|
||||
struct MPTAuthorizeArgs
|
||||
{
|
||||
XRPAmount const& priorBalance;
|
||||
uint192 const& mptIssuanceID;
|
||||
MPTID const& mptIssuanceID;
|
||||
AccountID const& accountID;
|
||||
std::uint32_t flags{};
|
||||
std::optional<AccountID> holderID{};
|
||||
|
||||
@@ -142,7 +142,9 @@ VaultCreate::doApply()
|
||||
view(),
|
||||
j_,
|
||||
{
|
||||
.account = pseudoId,
|
||||
// The operator-> gives the underlying STAccount,
|
||||
// whose value function returns a const&.
|
||||
.account = pseudoId->value(),
|
||||
.sequence = 1,
|
||||
.flags = mptFlags,
|
||||
.metadata = tx[~sfMPTokenMetadata],
|
||||
|
||||
@@ -71,7 +71,9 @@ VaultDelete::doApply()
|
||||
if (auto ter = MPTokenIssuanceDestroy::destroy(
|
||||
view(),
|
||||
j_,
|
||||
{.account = vault->at(sfAccount),
|
||||
// The operator-> gives the underlying STAccount,
|
||||
// whose value function returns a const&.
|
||||
{.account = vault->at(sfAccount)->value(),
|
||||
.issuanceID = vault->at(sfMPTokenIssuanceID)}))
|
||||
return ter;
|
||||
|
||||
|
||||
@@ -122,7 +122,9 @@ VaultDeposit::doApply()
|
||||
view(),
|
||||
ctx_.journal,
|
||||
{.priorBalance = mPriorBalance,
|
||||
.mptIssuanceID = mptIssuanceID,
|
||||
// The operator-> gives the underlying STUInt192
|
||||
// whose value function returns a const&.
|
||||
.mptIssuanceID = mptIssuanceID->value(),
|
||||
.accountID = account_});
|
||||
!isTesSuccess(err))
|
||||
return err;
|
||||
|
||||
Reference in New Issue
Block a user