From ce37acbd6d897f25feeafc8ff5d568f03e674773 Mon Sep 17 00:00:00 2001 From: Taiju Yamada Date: Sun, 19 Jun 2022 19:56:52 +0900 Subject: [PATCH] code review --- tests/test_pytypes.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/test_pytypes.cpp b/tests/test_pytypes.cpp index 311464163..4fc99fbd0 100644 --- a/tests/test_pytypes.cpp +++ b/tests/test_pytypes.cpp @@ -81,7 +81,7 @@ TEST_SUBMODULE(pytypes, m) { py::list l1 = py::list(); l1.append(1); l1.append(2); - py::object l2 = l1; + py::object l2 = std::move(l1); return l2[1]; }); @@ -147,13 +147,13 @@ TEST_SUBMODULE(pytypes, m) { m.def("access_dict_as_object_with_str", []() { py::dict d1 = py::dict(); d1["x"] = 1; - py::object d2 = d1; + py::object d2 = std::move(d1); return d2["x"]; }); m.def("access_dict_as_object_with_int", []() { py::dict d1 = py::dict(); d1[1] = 1; - py::object d2 = d1; + py::object d2 = std::move(d1); return d2[1]; });