mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-22 05:05:11 +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:
parent
5f5fd6a68e
commit
df27188dc6
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user