mirror of
https://github.com/XRPLF/clio.git
synced 2026-04-29 15:37:53 +00:00
style: Put static before type (#2231)
This commit is contained in:
@@ -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."},
|
||||
|
||||
@@ -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>) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user