mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
refactor: use east const convention (#5409)
This change refactors the codebase to use the "east const convention", and adds a clang-format rule to follow this convention.
This commit is contained in:
@@ -90,13 +90,13 @@ setSTAmountCanonicalizeSwitchover(bool v)
|
||||
*getStaticSTAmountCanonicalizeSwitchover() = v;
|
||||
}
|
||||
|
||||
static const std::uint64_t tenTo14 = 100000000000000ull;
|
||||
static const std::uint64_t tenTo14m1 = tenTo14 - 1;
|
||||
static const std::uint64_t tenTo17 = tenTo14 * 1000;
|
||||
static std::uint64_t const tenTo14 = 100000000000000ull;
|
||||
static std::uint64_t const tenTo14m1 = tenTo14 - 1;
|
||||
static std::uint64_t const tenTo17 = tenTo14 * 1000;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
static std::int64_t
|
||||
getInt64Value(STAmount const& amount, bool valid, const char* error)
|
||||
getInt64Value(STAmount const& amount, bool valid, char const* error)
|
||||
{
|
||||
if (!valid)
|
||||
Throw<std::runtime_error>(error);
|
||||
@@ -680,9 +680,9 @@ STAmount::add(Serializer& s) const
|
||||
}
|
||||
|
||||
bool
|
||||
STAmount::isEquivalent(const STBase& t) const
|
||||
STAmount::isEquivalent(STBase const& t) const
|
||||
{
|
||||
const STAmount* v = dynamic_cast<const STAmount*>(&t);
|
||||
STAmount const* v = dynamic_cast<STAmount const*>(&t);
|
||||
return v && (*v == *this);
|
||||
}
|
||||
|
||||
@@ -1065,7 +1065,7 @@ amountFromJsonNoThrow(STAmount& result, Json::Value const& jvSource)
|
||||
result = amountFromJson(sfGeneric, jvSource);
|
||||
return true;
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
catch (std::exception const& e)
|
||||
{
|
||||
JLOG(debugLog().warn())
|
||||
<< "amountFromJsonNoThrow: caught: " << e.what();
|
||||
|
||||
Reference in New Issue
Block a user