fix (false) warnings

This commit is contained in:
Joachim Schoeberl 2024-07-20 10:25:45 +02:00
parent 487942bc22
commit cb8c7850ba
2 changed files with 6 additions and 3 deletions

View File

@ -141,8 +141,10 @@ PYBIND11_MODULE(pyngcore, m) // NOLINT
.def(py::self | py::self)
.def(py::self & py::self)
.def(py::self |= py::self)
.def(py::self &= py::self)
// .def(py::self |= py::self) // false clang warnings,
// .def(py::self &= py::self) // see https://github.com/pybind/pybind11/issues/1893
.def("__ior__", [](BitArray& lhs, const BitArray& rhs) { return lhs |= rhs; }, py::is_operator())
.def("__iand__", [](BitArray& lhs, const BitArray& rhs) { return lhs &= rhs; }, py::is_operator())
.def(~py::self)
;

View File

@ -424,7 +424,8 @@ NGCORE_API_EXPORT void ExportGeom2d(py::module &m)
.def(py::self-py::self)
.def(py::self*py::self)
.def(py::self+=py::self)
.def(py::self-=py::self)
// .def(py::self-=py::self) // false clange warning, see https://github.com/pybind/pybind11/issues/1893
.def("__isub__", [](Solid2d& lhs, const Solid2d& rhs) { return lhs -= rhs; }, py::is_operator())
.def(py::self*=py::self)
.def("Mat", &Solid2d::Mat)