fix: warning on latest AppleClang (#2522)

Fixed in #2510 but reintroduced on one line by #2126
This commit is contained in:
Henry Schreiner 2020-09-22 17:36:25 -04:00 committed by GitHub
parent d74be32109
commit 3c7ef56bb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1489,7 +1489,7 @@ PYBIND11_NAMESPACE_BEGIN(detail)
inline str enum_name(handle arg) {
dict entries = arg.get_type().attr("__entries");
for (const auto &kv : entries) {
for (auto kv : entries) {
if (handle(kv.second[int_(0)]).equal(arg))
return pybind11::str(kv.first);
}