mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
refactor: Enable more clang-tidy readability checks (#6595)
Co-authored-by: Sergey Kuznetsov <kuzzz99@gmail.com>
This commit is contained in:
@@ -574,7 +574,7 @@ STTx::getBatchTransactionIDs() const
|
||||
{
|
||||
XRPL_ASSERT(getTxnType() == ttBATCH, "STTx::getBatchTransactionIDs : not a batch transaction");
|
||||
XRPL_ASSERT(
|
||||
getFieldArray(sfRawTransactions).size() != 0,
|
||||
!getFieldArray(sfRawTransactions).empty(),
|
||||
"STTx::getBatchTransactionIDs : empty raw transactions");
|
||||
|
||||
// The list of inner ids is built once, then reused on subsequent calls.
|
||||
@@ -618,7 +618,7 @@ isMemoOkay(STObject const& st, std::string& reason)
|
||||
{
|
||||
auto memoObj = dynamic_cast<STObject const*>(&memo);
|
||||
|
||||
if (!memoObj || (memoObj->getFName() != sfMemo))
|
||||
if ((memoObj == nullptr) || (memoObj->getFName() != sfMemo))
|
||||
{
|
||||
reason = "A memo array may contain only Memo objects.";
|
||||
return false;
|
||||
@@ -669,7 +669,7 @@ isMemoOkay(STObject const& st, std::string& reason)
|
||||
|
||||
for (unsigned char c : *optData)
|
||||
{
|
||||
if (!allowedSymbols[c])
|
||||
if (allowedSymbols[c] == 0)
|
||||
{
|
||||
reason =
|
||||
"The MemoType and MemoFormat fields may only "
|
||||
@@ -691,7 +691,7 @@ isAccountFieldOkay(STObject const& st)
|
||||
for (int i = 0; i < st.getCount(); ++i)
|
||||
{
|
||||
auto t = dynamic_cast<STAccount const*>(st.peekAtPIndex(i));
|
||||
if (t && t->isDefault())
|
||||
if ((t != nullptr) && t->isDefault())
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user