style: Put static before type (#2231)

This commit is contained in:
Ayaz Salikhov
2025-06-17 16:07:19 +01:00
committed by GitHub
parent 7584a683dd
commit 082f2fe21e
21 changed files with 155 additions and 152 deletions

View File

@@ -74,7 +74,7 @@ makeWarning(WarningCode code)
ClioErrorInfo const&
getErrorInfo(ClioError code)
{
constexpr static ClioErrorInfo kINFOS[]{
static constexpr ClioErrorInfo kINFOS[]{
{.code = ClioError::RpcMalformedCurrency, .error = "malformedCurrency", .message = "Malformed currency."},
{.code = ClioError::RpcMalformedRequest, .error = "malformedRequest", .message = "Malformed request."},
{.code = ClioError::RpcMalformedOwner, .error = "malformedOwner", .message = "Malformed owner."},

View File

@@ -36,7 +36,8 @@ namespace rpc::validation {
* @return true if convertible; false otherwise
*/
template <typename Expected>
[[nodiscard]] bool static checkType(boost::json::value const& value)
[[nodiscard]] static bool
checkType(boost::json::value const& value)
{
auto hasError = false;
if constexpr (std::is_same_v<Expected, bool>) {

View File

@@ -147,9 +147,9 @@ public:
{JS(ledger_index), validation::CustomValidators::ledgerIndexValidator}
};
auto static const kSPEC_V1 =
static auto const kSPEC_V1 =
RpcSpec{kSPEC_COMMON, {{JS(hotwallet), getHotWalletValidator(ripple::rpcINVALID_HOTWALLET)}}};
auto static const kSPEC_V2 =
static auto const kSPEC_V2 =
RpcSpec{kSPEC_COMMON, {{JS(hotwallet), getHotWalletValidator(ripple::rpcINVALID_PARAMS)}}};
return apiVersion == 1 ? kSPEC_V1 : kSPEC_V2;

View File

@@ -82,7 +82,8 @@ public:
override;
private:
std::unique_ptr<MetricBase> static makeMetric(std::string name, std::string labelsString, MetricType type);
static std::unique_ptr<MetricBase>
makeMetric(std::string name, std::string labelsString, MetricType type);
template <typename ValueType>
requires std::same_as<ValueType, std::int64_t> || std::same_as<ValueType, double>

View File

@@ -257,7 +257,8 @@ public:
*
* @param config The configuration to use
*/
void static init(util::config::ClioConfigDefinition const& config);
static void
init(util::config::ClioConfigDefinition const& config);
/**
* @brief Get a bool based metric. It will be created if it doesn't exist