Skip to content

Commit f414fbe

Browse files
authored
Merge pull request #473 from wxmerkt/topic/fix-warnings
Fix warnings to address unstable build on buildfarm
2 parents b6186cc + f50a0e5 commit f414fbe

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

include/eigenpy/deprecation-policy.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ constexpr PyObject *deprecationTypeToPyObj(DeprecationType dep) {
1919
return PyExc_DeprecationWarning;
2020
case DeprecationType::FUTURE:
2121
return PyExc_FutureWarning;
22+
default: // The switch handles all cases explicitly, this should never be
23+
// triggered.
24+
throw std::invalid_argument(
25+
"Undefined DeprecationType - this should never be triggered.");
2226
}
2327
}
2428

unittest/bind_virtual_factory.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ struct VirtualClassWrapper : MyVirtualClass, bp::wrapper<MyVirtualClass> {
7272
}
7373

7474
shared_ptr<MyVirtualData> createData() const override {
75-
if (bp::override fo = this->get_override("createData")) return fo();
75+
if (bp::override fo = this->get_override("createData")) {
76+
bp::object result = fo().as<bp::object>();
77+
return bp::extract<shared_ptr<MyVirtualData> >(result);
78+
}
7679
return default_createData();
7780
}
7881

0 commit comments

Comments
 (0)