From 80b05ba663c608f8c2053991ceb30303e12d754a Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Tue, 10 May 2022 18:39:53 -0700 Subject: [PATCH] Fix clang-tidy error [performance-move-constructor-init]. --- include/pybind11/pytypes.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index 0330b26b5..750d912ee 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -398,8 +398,9 @@ public: error_already_set(const error_already_set &) = default; error_already_set(error_already_set &&e) noexcept - : std::runtime_error(e), m_type{std::move(e.m_type)}, m_value{std::move(e.m_value)}, - m_trace{std::move(e.m_trace)}, m_lazy_what{std::move(e.m_lazy_what)} {}; + : std::runtime_error(std::move(e)), m_type{std::move(e.m_type)}, + m_value{std::move(e.m_value)}, m_trace{std::move(e.m_trace)}, m_lazy_what{std::move( + e.m_lazy_what)} {}; inline ~error_already_set() override;