mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +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:
@@ -45,7 +45,7 @@ Overload(Ts...) -> Overload<Ts...>;
|
||||
struct MultiApiJson_test : beast::unit_test::suite
|
||||
{
|
||||
static auto
|
||||
makeJson(const char* key, int val)
|
||||
makeJson(char const* key, int val)
|
||||
{
|
||||
Json::Value obj1(Json::objectValue);
|
||||
obj1[key] = val;
|
||||
@@ -80,7 +80,7 @@ struct MultiApiJson_test : beast::unit_test::suite
|
||||
testcase("forApiVersions, forAllApiVersions");
|
||||
|
||||
// Some static data for test inputs
|
||||
static const int primes[] = {2, 3, 5, 7, 11, 13, 17, 19, 23,
|
||||
static int const primes[] = {2, 3, 5, 7, 11, 13, 17, 19, 23,
|
||||
29, 31, 37, 41, 43, 47, 53, 59, 61,
|
||||
67, 71, 73, 79, 83, 89, 97};
|
||||
static_assert(std::size(primes) > RPC::apiMaximumValidVersion);
|
||||
@@ -205,7 +205,7 @@ struct MultiApiJson_test : beast::unit_test::suite
|
||||
return !requires {
|
||||
forAllApiVersions(
|
||||
std::forward<decltype(v)>(v).visit(), //
|
||||
[](auto, auto, const char*) {},
|
||||
[](auto, auto, char const*) {},
|
||||
1); // parameter type mismatch
|
||||
};
|
||||
}(std::as_const(s1)));
|
||||
@@ -256,7 +256,7 @@ struct MultiApiJson_test : beast::unit_test::suite
|
||||
Json::Value const&,
|
||||
std::integral_constant<unsigned int, Version>,
|
||||
int,
|
||||
const char*) {},
|
||||
char const*) {},
|
||||
0,
|
||||
"");
|
||||
};
|
||||
|
||||
@@ -91,7 +91,7 @@ struct STAccount_test : public beast::unit_test::suite
|
||||
{
|
||||
// Construct from a VL that is not exactly 160 bits.
|
||||
Serializer s;
|
||||
const std::uint8_t bits128[]{
|
||||
std::uint8_t const bits128[]{
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
|
||||
s.addVL(bits128, sizeof(bits128));
|
||||
SerialIter sit(s.slice());
|
||||
|
||||
@@ -300,7 +300,7 @@ public:
|
||||
unexpected(!to_currency(c, "USD"), "create USD currency");
|
||||
unexpected(to_string(c) != "USD", "check USD currency");
|
||||
|
||||
const std::string cur = "015841551A748AD2C1F76FF6ECB0CCCD00000000";
|
||||
std::string const cur = "015841551A748AD2C1F76FF6ECB0CCCD00000000";
|
||||
unexpected(!to_currency(c, cur), "create custom currency");
|
||||
unexpected(to_string(c) != cur, "check custom currency");
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ struct TER_test : public beast::unit_test::suite
|
||||
terRETRY,
|
||||
tesSUCCESS,
|
||||
tecCLAIM);
|
||||
static const int hiIndex{
|
||||
static int const hiIndex{
|
||||
std::tuple_size<decltype(terEnums)>::value - 1};
|
||||
|
||||
// Verify that enums cannot be converted to other enum types.
|
||||
@@ -277,7 +277,7 @@ struct TER_test : public beast::unit_test::suite
|
||||
tecCLAIM,
|
||||
NotTEC{telLOCAL_ERROR},
|
||||
TER{tecCLAIM});
|
||||
static const int hiIndex{std::tuple_size<decltype(ters)>::value - 1};
|
||||
static int const hiIndex{std::tuple_size<decltype(ters)>::value - 1};
|
||||
|
||||
// Verify that all types in the ters tuple can be compared with all
|
||||
// the other types in ters.
|
||||
|
||||
Reference in New Issue
Block a user