mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Resolve clang-tidy error:
```
include/pybind11/detail/type_caster_base.h:795:21: error: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty,-warnings-as-errors]
if (matching_bases.size() != 0) {
^~~~~~~~~~~~~~~~~~~~~~~~~~
!matching_bases.empty()
```
This commit is contained in:
@@ -792,7 +792,7 @@ public:
|
||||
matching_bases.push_back(base);
|
||||
}
|
||||
}
|
||||
if (matching_bases.size() != 0) {
|
||||
if (!matching_bases.empty()) {
|
||||
if (matching_bases.size() > 1) {
|
||||
matching_bases.push_back(const_cast<type_info *>(typeinfo));
|
||||
all_type_info_check_for_divergence(matching_bases);
|
||||
|
||||
Reference in New Issue
Block a user