clang-tidy: use auto

This commit is contained in:
Ralf W. Grosse-Kunstleve 2022-05-12 02:00:43 -07:00
parent 02df6c0114
commit d28c155c1d

View File

@ -478,9 +478,9 @@ error_string(PyObject *exc_type, PyObject *exc_value, PyObject *exc_trace) {
} }
// Normalize the exception only locally (to avoid side-effects for our caller). // Normalize the exception only locally (to avoid side-effects for our caller).
object exc_type_loc = reinterpret_borrow<object>(exc_type); auto exc_type_loc = reinterpret_borrow<object>(exc_type);
object exc_value_loc = reinterpret_borrow<object>(exc_value); auto exc_value_loc = reinterpret_borrow<object>(exc_value);
object exc_trace_loc = reinterpret_borrow<object>(exc_trace); auto exc_trace_loc = reinterpret_borrow<object>(exc_trace);
PyErr_NormalizeException(&exc_type_loc.ptr(), &exc_value_loc.ptr(), &exc_trace_loc.ptr()); PyErr_NormalizeException(&exc_type_loc.ptr(), &exc_value_loc.ptr(), &exc_trace_loc.ptr());
auto result = exc_type_loc.attr("__name__").cast<std::string>(); auto result = exc_type_loc.attr("__name__").cast<std::string>();