Skip to content

Commit b0d4e90

Browse files
committed
MSVC fix for masked variable warning
1 parent 4fed5f6 commit b0d4e90

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

include/pybind11/cast.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,12 @@ class type_info_iterator {
152152
private:
153153
// Position when iterating through the vector (MI-only)
154154
size_t position = 0;
155-
void load_mi_type_info(const tuple &bases) {
155+
// Loads bases from a multiple inheritance type; takes the first tuple of multiple bases
156+
// encountered.
157+
void load_mi_type_info(const tuple &init_bases) {
156158
std::vector<PyTypeObject *> check;
157-
check.reserve(bases.size());
158-
for (handle parent : bases) {
159+
check.reserve(init_bases.size());
160+
for (handle parent : init_bases) {
159161
check.push_back((PyTypeObject *) parent.ptr());
160162
}
161163
all.reset(new std::vector<type_info *>());

0 commit comments

Comments
 (0)