Skip to content

Commit

Permalink
Applying clang-tidy suggested fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralf W. Grosse-Kunstleve committed Jun 22, 2021
1 parent 2cbf77a commit ef433dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_pickling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ void wrap(py::module m) {
.def(py::init<>())
.def_readwrite("num", &SimpleBase::num)
.def(py::pickle(
[](py::object self) {
[](const py::object& self) {
py::dict d;
if (py::hasattr(self, "__dict__"))
d = self.attr("__dict__");
return py::make_tuple(self.attr("num"), d);
},
[](py::tuple t) {
[](const py::tuple& t) {
if (t.size() != 2)
throw std::runtime_error("Invalid state!");
auto cpp_state = std::unique_ptr<SimpleBase>(new SimpleBaseTrampoline);
Expand Down

0 comments on commit ef433dc

Please sign in to comment.