Fix MSVC build: Get the intended const& for some fields

- Also make MPTID more consistent
This commit is contained in:
Ed Hennis
2025-01-31 17:15:28 -05:00
parent eed18d16ce
commit c3f9a4c6ff
5 changed files with 12 additions and 5 deletions

View File

@@ -61,7 +61,8 @@ using NodeID = base_uint<160, detail::NodeIDTag>;
/** MPTID is a 192-bit value representing MPT Issuance ID, /** MPTID is a 192-bit value representing MPT Issuance ID,
* which is a concatenation of a 32-bit sequence (big endian) * which is a concatenation of a 32-bit sequence (big endian)
* and a 160-bit account */ * and a 160-bit account */
using MPTID = base_uint<192>; // TODO - edhennis - Add a tag
using MPTID = uint192;
/** XRP currency. */ /** XRP currency. */
Currency const& Currency const&

View File

@@ -27,7 +27,7 @@ namespace ripple {
struct MPTAuthorizeArgs struct MPTAuthorizeArgs
{ {
XRPAmount const& priorBalance; XRPAmount const& priorBalance;
uint192 const& mptIssuanceID; MPTID const& mptIssuanceID;
AccountID const& accountID; AccountID const& accountID;
std::uint32_t flags{}; std::uint32_t flags{};
std::optional<AccountID> holderID{}; std::optional<AccountID> holderID{};

View File

@@ -142,7 +142,9 @@ VaultCreate::doApply()
view(), view(),
j_, j_,
{ {
.account = pseudoId, // The operator-> gives the underlying STAccount,
// whose value function returns a const&.
.account = pseudoId->value(),
.sequence = 1, .sequence = 1,
.flags = mptFlags, .flags = mptFlags,
.metadata = tx[~sfMPTokenMetadata], .metadata = tx[~sfMPTokenMetadata],

View File

@@ -71,7 +71,9 @@ VaultDelete::doApply()
if (auto ter = MPTokenIssuanceDestroy::destroy( if (auto ter = MPTokenIssuanceDestroy::destroy(
view(), view(),
j_, 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)})) .issuanceID = vault->at(sfMPTokenIssuanceID)}))
return ter; return ter;

View File

@@ -122,7 +122,9 @@ VaultDeposit::doApply()
view(), view(),
ctx_.journal, ctx_.journal,
{.priorBalance = mPriorBalance, {.priorBalance = mPriorBalance,
.mptIssuanceID = mptIssuanceID, // The operator-> gives the underlying STUInt192
// whose value function returns a const&.
.mptIssuanceID = mptIssuanceID->value(),
.accountID = account_}); .accountID = account_});
!isTesSuccess(err)) !isTesSuccess(err))
return err; return err;