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:
Ralf W. Grosse-Kunstleve 2023-11-07 09:19:24 -08:00
parent 5f5fd6a68e
commit df27188dc6
1 changed files with 1 additions and 1 deletions

View File

@ -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);