mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
chore: Enable most clang-tidy bugprone checks (#6929)
Co-authored-by: Ayaz Salikhov <mathbunnyru@users.noreply.github.com>
This commit is contained in:
@@ -265,7 +265,7 @@ inline Scheduler::queue_type::~queue_type()
|
||||
auto e = &*iter;
|
||||
++iter;
|
||||
e->~event();
|
||||
alloc_->deallocate(e, sizeof(e));
|
||||
alloc_->deallocate(e, sizeof(e)); // NOLINT(bugprone-sizeof-expression)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -452,7 +452,7 @@ private:
|
||||
bool ssl;
|
||||
|
||||
lambda(int id_, TrustedPublisherServer& self_, socket_type&& sock_, bool ssl_)
|
||||
: id(id_), self(self_), sock(std::move(sock_)), work(sock_.get_executor()), ssl(ssl_)
|
||||
: id(id_), self(self_), sock(std::move(sock_)), work(sock.get_executor()), ssl(ssl_)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -75,9 +75,10 @@ public:
|
||||
return hotTRANSACTION_NODE;
|
||||
case 3:
|
||||
return hotUNKNOWN;
|
||||
default:
|
||||
// will never happen, but make static analysis tool happy.
|
||||
return hotUNKNOWN;
|
||||
}
|
||||
// will never happen, but make static analysis tool happy.
|
||||
return hotUNKNOWN;
|
||||
}();
|
||||
|
||||
uint256 hash;
|
||||
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
parallel_for(std::size_t const n, std::size_t number_of_threads, Args const&... args)
|
||||
{
|
||||
std::atomic<std::size_t> c(0);
|
||||
std::vector<beast::unit_test::thread> t;
|
||||
std::vector<beast::unit_test::Thread> t;
|
||||
t.reserve(number_of_threads);
|
||||
for (std::size_t id = 0; id < number_of_threads; ++id)
|
||||
t.emplace_back(*this, parallel_for_lambda<Body>(n, c), args...);
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
parallel_for_id(std::size_t const n, std::size_t number_of_threads, Args const&... args)
|
||||
{
|
||||
std::atomic<std::size_t> c(0);
|
||||
std::vector<beast::unit_test::thread> t;
|
||||
std::vector<beast::unit_test::Thread> t;
|
||||
t.reserve(number_of_threads);
|
||||
for (std::size_t id = 0; id < number_of_threads; ++id)
|
||||
t.emplace_back(*this, parallel_for_lambda<Body>(n, c), id, args...);
|
||||
|
||||
Reference in New Issue
Block a user