Add more readability tidy rules (#5924)

* Apply clang-tidy readibility fixes

Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>

* Add checks

Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>

* More fixes

Signed-off-by: cyy <cyyever@outlook.com>

---------

Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
Signed-off-by: cyy <cyyever@outlook.com>
This commit is contained in:
Yuanyuan Chen
2025-12-09 01:36:51 +08:00
committed by GitHub
parent 6651530963
commit 3ebbecb8af
16 changed files with 36 additions and 37 deletions

View File

@@ -556,7 +556,7 @@ TEST_SUBMODULE(sequences_and_iterators, m) {
});
m.def("count_nonzeros", [](const py::dict &d) {
return std::count_if(d.begin(), d.end(), [](std::pair<py::handle, py::handle> p) {
return std::count_if(d.begin(), d.end(), [](const std::pair<py::handle, py::handle> &p) {
return p.second.cast<int>() != 0;
});
});