diff --git a/src/rpc/CredentialHelpers.cpp b/src/rpc/CredentialHelpers.cpp index adff73ac..bbea85ca 100644 --- a/src/rpc/CredentialHelpers.cpp +++ b/src/rpc/CredentialHelpers.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include diff --git a/src/rpc/common/Validators.cpp b/src/rpc/common/Validators.cpp index cfd875c3..47ea3e41 100644 --- a/src/rpc/common/Validators.cpp +++ b/src/rpc/common/Validators.cpp @@ -267,10 +267,11 @@ CustomValidator CustomValidators::CredentialTypeValidator = if (credTypeHex->empty()) return Error{Status{ClioError::rpcMALFORMED_AUTHORIZED_CREDENTIALS, std::string(key) + " is empty"}}; - if (credTypeHex->size() > ripple::maxCredentialTypeLength) + if (credTypeHex->size() > ripple::maxCredentialTypeLength) { return Error{ Status{ClioError::rpcMALFORMED_AUTHORIZED_CREDENTIALS, std::string(key) + " greater than max length"} }; +} return MaybeError{}; }}; @@ -281,7 +282,7 @@ CustomValidator CustomValidators::AuthorizeCredentialValidator = return Error{Status{ClioError::rpcMALFORMED_REQUEST, std::string(key) + " not array"}}; auto const& authCred = value.as_array(); - if (authCred.size() == 0) { + if (authCred.empty()) { return Error{Status{ ClioError::rpcMALFORMED_AUTHORIZED_CREDENTIALS, fmt::format("Requires at least one element in authorized_credentials array") diff --git a/src/rpc/handlers/DepositAuthorized.cpp b/src/rpc/handlers/DepositAuthorized.cpp index fc3f24c1..fb9c21e1 100644 --- a/src/rpc/handlers/DepositAuthorized.cpp +++ b/src/rpc/handlers/DepositAuthorized.cpp @@ -32,13 +32,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/src/rpc/handlers/LedgerEntry.cpp b/src/rpc/handlers/LedgerEntry.cpp index 50675b4f..d27a0045 100644 --- a/src/rpc/handlers/LedgerEntry.cpp +++ b/src/rpc/handlers/LedgerEntry.cpp @@ -41,7 +41,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/unit/rpc/RPCHelpersTests.cpp b/tests/unit/rpc/RPCHelpersTests.cpp index 0b99a5dc..7c972ec5 100644 --- a/tests/unit/rpc/RPCHelpersTests.cpp +++ b/tests/unit/rpc/RPCHelpersTests.cpp @@ -35,7 +35,6 @@ #include #include #include -#include #include #include #include diff --git a/tests/unit/rpc/handlers/DepositAuthorizedTests.cpp b/tests/unit/rpc/handlers/DepositAuthorizedTests.cpp index fc478a5a..68251f33 100644 --- a/tests/unit/rpc/handlers/DepositAuthorizedTests.cpp +++ b/tests/unit/rpc/handlers/DepositAuthorizedTests.cpp @@ -37,7 +37,6 @@ #include #include #include -#include #include #include