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,
* 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&

View File

@@ -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{};

View File

@@ -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],

View File

@@ -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;

View File

@@ -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;