Skip to content

Commit

Permalink
style: clang-tidy auto fixes (#1735)
Browse files Browse the repository at this point in the history
Fixes #1734. Please review and commit clang-tidy fixes.

Co-authored-by: kuznetsss <[email protected]>
  • Loading branch information
github-actions[bot] and kuznetsss authored Nov 15, 2024
1 parent 67d9945 commit 6bb5804
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/rpc/CredentialHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/LedgerFormats.h>
#include <xrpl/protocol/LedgerHeader.h>
#include <xrpl/protocol/Protocol.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/STArray.h>
#include <xrpl/protocol/STLedgerEntry.h>
Expand Down
5 changes: 3 additions & 2 deletions src/rpc/common/Validators.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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{};
}};
Expand All @@ -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")
Expand Down
2 changes: 0 additions & 2 deletions src/rpc/handlers/DepositAuthorized.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@
#include <boost/json/value.hpp>
#include <boost/json/value_to.hpp>
#include <xrpl/basics/base_uint.h>
#include <xrpl/basics/chrono.h>
#include <xrpl/basics/strHex.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/LedgerFormats.h>
#include <xrpl/protocol/LedgerHeader.h>
#include <xrpl/protocol/Protocol.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/STLedgerEntry.h>
#include <xrpl/protocol/STObject.h>
#include <xrpl/protocol/Serializer.h>
Expand Down
1 change: 0 additions & 1 deletion src/rpc/handlers/LedgerEntry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <xrpl/protocol/Issue.h>
#include <xrpl/protocol/LedgerFormats.h>
#include <xrpl/protocol/LedgerHeader.h>
#include <xrpl/protocol/Protocol.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/STLedgerEntry.h>
#include <xrpl/protocol/STXChainBridge.h>
Expand Down
1 change: 0 additions & 1 deletion tests/unit/rpc/RPCHelpersTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <fmt/core.h>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <xrpl/basics/Blob.h>
#include <xrpl/basics/base_uint.h>
#include <xrpl/protocol/ErrorCodes.h>
#include <xrpl/protocol/Indexes.h>
Expand Down
1 change: 0 additions & 1 deletion tests/unit/rpc/handlers/DepositAuthorizedTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <xrpl/basics/strHex.h>
#include <xrpl/protocol/Indexes.h>
#include <xrpl/protocol/LedgerFormats.h>
#include <xrpl/protocol/STArray.h>

#include <chrono>
#include <optional>
Expand Down

0 comments on commit 6bb5804

Please sign in to comment.