99
1010#include < range/v3/view/enumerate.hpp>
1111#include < range/v3/view/map.hpp>
12+ #include < range/v3/view/subrange.hpp>
1213#include < spdlog/spdlog.h>
1314
1415#include " Face.h"
@@ -56,7 +57,7 @@ std::vector<Vector> calculateProjectionNormals(const std::vector<FaceData>& face
5657 });
5758
5859 // The unprocessed_faces is a sub-range of the faces list, that contains all the faces that have not been assigned to a group yet.
59- auto unprocessed_faces = std:: ranges::subrange (faces_to_process);
60+ auto unprocessed_faces = ranges::subrange (faces_to_process. begin (), faces_to_process. end () );
6061
6162 while (true )
6263 {
@@ -70,7 +71,7 @@ std::vector<Vector> calculateProjectionNormals(const std::vector<FaceData>& face
7071 });
7172
7273 // All the faces placed to the current group are now no more in the unprocessed faces
73- unprocessed_faces = std:: ranges::subrange (unprocessed_faces.begin (), current_faces_group.begin ());
74+ unprocessed_faces = ranges::subrange (unprocessed_faces.begin (), current_faces_group.begin ());
7475
7576 // Sum all the normals of the current faces group to get the average direction
7677 Vector summed_normals = std::accumulate (
@@ -113,7 +114,7 @@ std::vector<Vector> calculateProjectionNormals(const std::vector<FaceData>& face
113114 // Remove the faces from the unprocessed faces
114115 const auto last_position = std::prev (unprocessed_faces.end ());
115116 std::iter_swap (best_outlier_face, last_position);
116- unprocessed_faces = std:: ranges::subrange (unprocessed_faces.begin (), last_position);
117+ unprocessed_faces = ranges::subrange (unprocessed_faces.begin (), last_position);
117118 }
118119 else if (! projection_normals.empty ())
119120 {
0 commit comments