diff --git a/ChangeLog.md b/ChangeLog.md index 37aa858341..66118a55f8 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -15,6 +15,9 @@ ## Changes - *General* - Renaming AUTHORS→CONTRIBUTORS for HAL (David Coeurjolly, [#1699](https://github.com/DGtal-team/DGtal/pull/1699)) + +- *Project* + - Add CMake option DGTAL_WRAP_PYTHON (Pablo Hernandez-Cerdan, [#1700](https://github.com/DGtal-team/DGtal/pull/1700)) - *IO* - New method to change the mode of the light position in Viewer3D (fixed to diff --git a/src/DGtal/topology/VoxelComplex.ih b/src/DGtal/topology/VoxelComplex.ih index 1bb0136509..dd1ecabf34 100644 --- a/src/DGtal/topology/VoxelComplex.ih +++ b/src/DGtal/topology/VoxelComplex.ih @@ -190,8 +190,7 @@ inline void DGtal::VoxelComplex::insertVoxelCell( const Cell &kcell, const bool &close_it, const Data &data) { - const auto &ks = this->space(); - ASSERT(ks.uDim(kcell) == 3); + ASSERT(this->space().uDim(kcell) == 3); this->insertCell(3, kcell, data); if (close_it) voxelClose(kcell); @@ -513,8 +512,7 @@ DGtal::VoxelComplex::K_2(const Cell &face2, ASSERT(ks.uIsSurfel(face2)); using KPreSpace = typename TKSpace::PreCellularGridSpace; const auto co_faces = KPreSpace::uCoFaces(face2); - const auto nco_faces = co_faces.size(); - ASSERT(nco_faces == 2); + ASSERT(co_faces.size() == 2); const auto &cf0 = co_faces[0]; const auto &cf1 = co_faces[1]; // spels must belong to complex. diff --git a/wrap/images/ImageContainerBySTLVector_declare_py.h b/wrap/images/ImageContainerBySTLVector_declare_py.h index 9eb2ba05e7..2325810d10 100644 --- a/wrap/images/ImageContainerBySTLVector_declare_py.h +++ b/wrap/images/ImageContainerBySTLVector_declare_py.h @@ -64,14 +64,14 @@ using Is3D = typename std::enable_if::type; template void def_toindices(pybind11::class_ & py_class, Is2D * = nullptr) { - py_class.def("toindices", [](const TT & self, const typename TT::Point & a_point) { + py_class.def("toindices", [](const TT &, const typename TT::Point & a_point) { return pybind11::make_tuple(a_point[1], a_point[0]); }, "Return tuple of the i,j,k-coordinates of the input point in the c_style format: (k,j,i)"); } template void def_toindices(pybind11::class_ & py_class, Is3D * = nullptr) { - py_class.def("toindices", [](const TT & self, const typename TT::Point & a_point) { + py_class.def("toindices", [](const TT &, const typename TT::Point & a_point) { return pybind11::make_tuple(a_point[2], a_point[1], a_point[0]); }, "Return tuple of the i,j,k-coordinates of the input point in the c_style format: (k,j,i)"); } diff --git a/wrap/kernel/HyperRectDomain_declare_py.h b/wrap/kernel/HyperRectDomain_declare_py.h index eedf8f0b5b..ac6a25a636 100644 --- a/wrap/kernel/HyperRectDomain_declare_py.h +++ b/wrap/kernel/HyperRectDomain_declare_py.h @@ -45,7 +45,7 @@ The following code snippet demonstrates how to use \p HyperRectDomain )"; auto py_class = py::class_(m, typestr.c_str(), docs.c_str()); - py_class.def("dtype", [](const TT &self) { + py_class.def("dtype", [](const TT &) { return DGtal::Python::Integer_str; }); // ----------------------- Constructors -----------------------------------