From 549c98ac88ac3c9b8c4d020c84c818981bef8c34 Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Thu, 11 Nov 2021 10:02:58 +0100 Subject: [PATCH] Fix its_number_of_patches returning bool instead of size_t --- src/libslic3r/TriangleMesh.cpp | 4 ++-- src/libslic3r/TriangleMesh.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libslic3r/TriangleMesh.cpp b/src/libslic3r/TriangleMesh.cpp index efd8e97f71..b33dd38cc5 100644 --- a/src/libslic3r/TriangleMesh.cpp +++ b/src/libslic3r/TriangleMesh.cpp @@ -1190,11 +1190,11 @@ std::vector its_split(const indexed_triangle_set &its) } // Number of disconnected patches (faces are connected if they share an edge, shared edge defined with 2 shared vertex indices). -bool its_number_of_patches(const indexed_triangle_set &its) +size_t its_number_of_patches(const indexed_triangle_set &its) { return its_number_of_patches<>(its); } -bool its_number_of_patches(const indexed_triangle_set &its, const std::vector &face_neighbors) +size_t its_number_of_patches(const indexed_triangle_set &its, const std::vector &face_neighbors) { return its_number_of_patches<>(ItsNeighborsWrapper{ its, face_neighbors }); } diff --git a/src/libslic3r/TriangleMesh.hpp b/src/libslic3r/TriangleMesh.hpp index 951e351fee..459917ab92 100644 --- a/src/libslic3r/TriangleMesh.hpp +++ b/src/libslic3r/TriangleMesh.hpp @@ -219,8 +219,8 @@ std::vector its_split(const indexed_triangle_set &its); std::vector its_split(const indexed_triangle_set &its, std::vector &face_neighbors); // Number of disconnected patches (faces are connected if they share an edge, shared edge defined with 2 shared vertex indices). -bool its_number_of_patches(const indexed_triangle_set &its); -bool its_number_of_patches(const indexed_triangle_set &its, const std::vector &face_neighbors); +size_t its_number_of_patches(const indexed_triangle_set &its); +size_t its_number_of_patches(const indexed_triangle_set &its, const std::vector &face_neighbors); // Same as its_number_of_patches(its) > 1, but faster. bool its_is_splittable(const indexed_triangle_set &its); bool its_is_splittable(const indexed_triangle_set &its, const std::vector &face_neighbors);