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:
Vito Tumas
2025-05-08 13:00:42 +02:00
committed by GitHub
parent 2db2791805
commit 3e152fec74
212 changed files with 812 additions and 795 deletions

View File

@@ -60,8 +60,8 @@ struct Credentials_test : public beast::unit_test::suite
{
using namespace test::jtx;
const char credType[] = "abcde";
const char uri[] = "uri";
char const credType[] = "abcde";
char const uri[] = "uri";
Account const issuer{"issuer"};
Account const subject{"subject"};
@@ -209,7 +209,7 @@ struct Credentials_test : public beast::unit_test::suite
{
using namespace test::jtx;
const char credType[] = "abcde";
char const credType[] = "abcde";
Account const issuer{"issuer"};
Account const subject{"subject"};
@@ -458,7 +458,7 @@ struct Credentials_test : public beast::unit_test::suite
{
using namespace test::jtx;
const char credType[] = "abcde";
char const credType[] = "abcde";
Account const issuer{"issuer"};
Account const subject{"subject"};
@@ -616,7 +616,7 @@ struct Credentials_test : public beast::unit_test::suite
{
using namespace jtx;
const char credType[] = "abcde";
char const credType[] = "abcde";
Account const issuer{"issuer"};
Account const subject{"subject"};
Account const other{"other"};
@@ -726,7 +726,7 @@ struct Credentials_test : public beast::unit_test::suite
}
{
const char credType2[] = "efghi";
char const credType2[] = "efghi";
testcase("CredentialsAccept fail, expired credentials.");
auto jv = credentials::create(subject, issuer, credType2);
@@ -797,7 +797,7 @@ struct Credentials_test : public beast::unit_test::suite
{
using namespace test::jtx;
const char credType[] = "abcde";
char const credType[] = "abcde";
Account const issuer{"issuer"};
Account const subject{"subject"};
Account const other{"other"};
@@ -842,7 +842,7 @@ struct Credentials_test : public beast::unit_test::suite
}
{
const char credType2[] = "fghij";
char const credType2[] = "fghij";
env(credentials::create(subject, issuer, credType2));
env.close();
@@ -944,7 +944,7 @@ struct Credentials_test : public beast::unit_test::suite
{
using namespace test::jtx;
const char credType[] = "abcde";
char const credType[] = "abcde";
Account const issuer{"issuer"};
Account const subject{"subject"};
@@ -972,7 +972,7 @@ struct Credentials_test : public beast::unit_test::suite
{
using namespace test::jtx;
const char credType[] = "abcde";
char const credType[] = "abcde";
Account const issuer{"issuer"};
Account const subject{"subject"};
@@ -1069,7 +1069,7 @@ struct Credentials_test : public beast::unit_test::suite
std::string("Test flag, fix ") +
(enabled ? "enabled" : "disabled"));
const char credType[] = "abcde";
char const credType[] = "abcde";
Account const issuer{"issuer"};
Account const subject{"subject"};