resolve clang-tidy warning

This commit is contained in:
Ralf W. Grosse-Kunstleve 2023-05-17 15:53:57 -07:00
parent 5168c135ae
commit d53a796116

View File

@ -527,7 +527,7 @@ TEST_SUBMODULE(numpy_array, sm) {
sm.def("pass_array_pyobject_ptr_return_sum_str_values", sm.def("pass_array_pyobject_ptr_return_sum_str_values",
[](const py::array_t<PyObject *> &objs) { [](const py::array_t<PyObject *> &objs) {
std::string sum_str_values; std::string sum_str_values;
for (auto &obj : objs) { for (const auto &obj : objs) {
sum_str_values += py::str(obj.attr("value")); sum_str_values += py::str(obj.attr("value"));
} }
return sum_str_values; return sum_str_values;