mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-21 14:20:56 +00:00
chore: Rename CamelCase namespaces to snake_case (#7933)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
|
||||
namespace xrpl {
|
||||
|
||||
namespace STParsedJSONDetail {
|
||||
namespace st_parsed_json_detail {
|
||||
template <typename U, typename S>
|
||||
constexpr U
|
||||
toUnsigned(S value)
|
||||
@@ -93,7 +93,7 @@ makeName(std::string const& object, std::string const& field)
|
||||
static inline json::Value
|
||||
notAnObject(std::string const& object, std::string const& field)
|
||||
{
|
||||
return RPC::makeError(
|
||||
return rpc::makeError(
|
||||
RpcInvalidParams, "Field '" + makeName(object, field) + "' is not a JSON object.");
|
||||
}
|
||||
|
||||
@@ -106,33 +106,33 @@ notAnObject(std::string const& object)
|
||||
static inline json::Value
|
||||
notAnArray(std::string const& object)
|
||||
{
|
||||
return RPC::makeError(RpcInvalidParams, "Field '" + object + "' is not a JSON array.");
|
||||
return rpc::makeError(RpcInvalidParams, "Field '" + object + "' is not a JSON array.");
|
||||
}
|
||||
|
||||
static inline json::Value
|
||||
unknownField(std::string const& object, std::string const& field)
|
||||
{
|
||||
return RPC::makeError(RpcInvalidParams, "Field '" + makeName(object, field) + "' is unknown.");
|
||||
return rpc::makeError(RpcInvalidParams, "Field '" + makeName(object, field) + "' is unknown.");
|
||||
}
|
||||
|
||||
static inline json::Value
|
||||
outOfRange(std::string const& object, std::string const& field)
|
||||
{
|
||||
return RPC::makeError(
|
||||
return rpc::makeError(
|
||||
RpcInvalidParams, "Field '" + makeName(object, field) + "' is out of range.");
|
||||
}
|
||||
|
||||
static inline json::Value
|
||||
badType(std::string const& object, std::string const& field)
|
||||
{
|
||||
return RPC::makeError(
|
||||
return rpc::makeError(
|
||||
RpcInvalidParams, "Field '" + makeName(object, field) + "' has bad type.");
|
||||
}
|
||||
|
||||
static inline json::Value
|
||||
invalidData(std::string const& object, std::string const& field)
|
||||
{
|
||||
return RPC::makeError(
|
||||
return rpc::makeError(
|
||||
RpcInvalidParams, "Field '" + makeName(object, field) + "' has invalid data.");
|
||||
}
|
||||
|
||||
@@ -145,14 +145,14 @@ invalidData(std::string const& object)
|
||||
static inline json::Value
|
||||
arrayExpected(std::string const& object, std::string const& field)
|
||||
{
|
||||
return RPC::makeError(
|
||||
return rpc::makeError(
|
||||
RpcInvalidParams, "Field '" + makeName(object, field) + "' must be a JSON array.");
|
||||
}
|
||||
|
||||
static inline json::Value
|
||||
arrayTooBig(std::string const& object, std::string const& field)
|
||||
{
|
||||
return RPC::makeError(
|
||||
return rpc::makeError(
|
||||
RpcInvalidParams,
|
||||
"Field '" + makeName(object, field) + "' exceeds allowed JSON array size of " +
|
||||
std::to_string(kMaxParsedJsonArraySize) + " elements per field.");
|
||||
@@ -161,20 +161,20 @@ arrayTooBig(std::string const& object, std::string const& field)
|
||||
static inline json::Value
|
||||
stringExpected(std::string const& object, std::string const& field)
|
||||
{
|
||||
return RPC::makeError(
|
||||
return rpc::makeError(
|
||||
RpcInvalidParams, "Field '" + makeName(object, field) + "' must be a string.");
|
||||
}
|
||||
|
||||
static inline json::Value
|
||||
tooDeep(std::string const& object)
|
||||
{
|
||||
return RPC::makeError(RpcInvalidParams, "Field '" + object + "' exceeds nesting depth limit.");
|
||||
return rpc::makeError(RpcInvalidParams, "Field '" + object + "' exceeds nesting depth limit.");
|
||||
}
|
||||
|
||||
static inline json::Value
|
||||
singletonExpected(std::string const& object, unsigned int index)
|
||||
{
|
||||
return RPC::makeError(
|
||||
return rpc::makeError(
|
||||
RpcInvalidParams,
|
||||
"Field '" + object + "[" + std::to_string(index) +
|
||||
"]' must be an object with a single key/object value.");
|
||||
@@ -183,7 +183,7 @@ singletonExpected(std::string const& object, unsigned int index)
|
||||
static inline json::Value
|
||||
templateMismatch(SField const& sField)
|
||||
{
|
||||
return RPC::makeError(
|
||||
return rpc::makeError(
|
||||
RpcInvalidParams,
|
||||
"Object '" + sField.getName() + "' contents did not meet requirements for that type.");
|
||||
}
|
||||
@@ -191,7 +191,7 @@ templateMismatch(SField const& sField)
|
||||
static inline json::Value
|
||||
nonObjectInArray(std::string const& item, json::UInt index)
|
||||
{
|
||||
return RPC::makeError(
|
||||
return rpc::makeError(
|
||||
RpcInvalidParams,
|
||||
"Item '" + item + "' at index " + std::to_string(index) +
|
||||
" is not an object. Arrays may only contain objects.");
|
||||
@@ -791,7 +791,7 @@ parseLeaf(
|
||||
|
||||
if (pathEl.isMember(jss::currency) && pathEl.isMember(jss::mpt_issuance_id))
|
||||
{
|
||||
error = RPC::makeError(RpcInvalidParams, "Invalid Asset.");
|
||||
error = rpc::makeError(RpcInvalidParams, "Invalid Asset.");
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -1195,13 +1195,13 @@ parseArray(
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace STParsedJSONDetail
|
||||
} // namespace st_parsed_json_detail
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
STParsedJSONObject::STParsedJSONObject(std::string const& name, json::Value const& json)
|
||||
{
|
||||
using namespace STParsedJSONDetail;
|
||||
using namespace st_parsed_json_detail;
|
||||
object = parseObject(name, json, sfGeneric, 0, error);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user