Skip to content

Commit

Permalink
use auto const
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnxie999 committed Jan 17, 2024
1 parent 593898d commit 8080db9
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/ripple/app/tx/impl/MPTokenAuthorize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ MPTokenAuthorize::preclaim(PreclaimContext const& ctx)
if (holderID && !(ctx.view.exists(keylet::account(*holderID))))
return tecNO_DST;

std::shared_ptr<SLE const> sleMptIssuance;

// if non-issuer account submits this tx, then they are trying either:
// 1. Unauthorize/delete MPToken
// 2. Use/create MPToken
Expand Down Expand Up @@ -83,7 +81,7 @@ MPTokenAuthorize::preclaim(PreclaimContext const& ctx)
}

// Now test when the holder wants to hold/create/authorize a new MPT
sleMptIssuance =
auto const sleMptIssuance =
ctx.view.read(keylet::mptIssuance(ctx.tx[sfMPTokenIssuanceID]));

if (!sleMptIssuance)
Expand All @@ -99,7 +97,7 @@ MPTokenAuthorize::preclaim(PreclaimContext const& ctx)
return tesSUCCESS;
}

sleMptIssuance =
auto const sleMptIssuance =
ctx.view.read(keylet::mptIssuance(ctx.tx[sfMPTokenIssuanceID]));
if (!sleMptIssuance)
return tecOBJECT_NOT_FOUND;
Expand Down Expand Up @@ -202,7 +200,7 @@ MPTokenAuthorize::doApply()
return tesSUCCESS;
}

std::shared_ptr<SLE const> sleMptIssuance =
auto const sleMptIssuance =
view().read(keylet::mptIssuance(mptIssuanceID));
if (!sleMptIssuance)
return tecINTERNAL;
Expand Down

0 comments on commit 8080db9

Please sign in to comment.