mirror of
https://github.com/RYDE-WORK/pybind11.git
synced 2026-01-19 21:23:26 +08:00
Avoid copy in iteration by using const auto & (#4861)
This change is fixing a Coverity AUTO_CAUSES_COPY issues.
This commit is contained in:
parent
5891867ee4
commit
7e5edbc947
@ -1142,7 +1142,7 @@ protected:
|
||||
}
|
||||
msg += "kwargs: ";
|
||||
bool first = true;
|
||||
for (auto kwarg : kwargs) {
|
||||
for (const auto &kwarg : kwargs) {
|
||||
if (first) {
|
||||
first = false;
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user