Skip to content

Commit

Permalink
clang
Browse files Browse the repository at this point in the history
  • Loading branch information
shawnxie999 committed Jan 9, 2024
1 parent baca32e commit b1513c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ripple/app/tx/impl/MPTokenIssuanceCreate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ MPTokenIssuanceCreate::preflight(PreflightContext const& ctx)
{
if (maxAmt == 0)
return temMALFORMED;

// TODO: Improve this check and move the constant elsewhere (STAmount?)
if (maxAmt > 0x7FFFFFFFFFFFFFFFull)
return temMALFORMED;
Expand Down
3 changes: 2 additions & 1 deletion src/test/app/MPToken_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ class MPToken_test : public beast::unit_test::suite
env.close();

// MaximumAmount larger than 63 bit returns errpr
env(mpt::create(alice, 0xFFFFFFFFFFFFFFF0ull, 0, 0, "test"), ter(temMALFORMED));
env(mpt::create(alice, 0xFFFFFFFFFFFFFFF0ull, 0, 0, "test"),
ter(temMALFORMED));
env.close();
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/test/jtx/impl/mpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ namespace jtx {

namespace mpt {

static std::array<std::uint8_t, 8>
uint64ToByteArray(std::uint64_t value) {
static std::array<std::uint8_t, 8>
uint64ToByteArray(std::uint64_t value)
{
value = boost::endian::native_to_big(value);
std::array<std::uint8_t, 8> result;
std::memcpy(result.data(), &value, sizeof(value));
Expand Down

0 comments on commit b1513c2

Please sign in to comment.