constexpr bool unassigned = false
auto face_struct_list = {
{face.i1, unassigned, new_indices_groups.find(face.i1) }
{face.i2, unassigned, new_indices_groups.find(face.i2) }
{face.i3, unassigned, new_indices_groups.find(face.i3) }
}
Then for either block you can use something like;
ranges::for_each(face_struct_list,
[](auto& tuple)
{
auto [idx, assigned, it] = tuple;
// ... rest of loop-code
});
Since the library didn't really exist yet before this point, we didn't really have to work with PR's. One downside is that you can't really review to work done in the same way though -- so have this 'issue' instead.
libUvula/src/unwrap.cpp
Line 403 in 4eb68c5
I've noticed we're importing spdlog anyway, maybe should make use of that to make this into a debug thing.
libUvula/src/unwrap.cpp
Line 347 in 4eb68c5
ranges::enumeratehere instead, I think.libUvula/pyUvula/pyUvula.cpp
Line 20 in 4eb68c5
libUvula/pyUvula/pyUvula.cpp
Line 38 in 4eb68c5
libUvula/src/unwrap.cpp
Line 98 in 4eb68c5
libUvula/src/unwrap.cpp
Line 103 in 4eb68c5
(like, it's technically possible to have a dot-product of 1.0 between two vectors).
It's probably better to have something that's a little bigger than |1.0| exactly -- I might even have gone with
(-)numeric_limits<float>::infinity().libUvula/src/unwrap.cpp
Line 101 in 4eb68c5
libUvula/src/unwrap.cpp
Line 202 in 4eb68c5
for(auto [key, value] : projected_faces_groups) { ... }(Also;
keyandvaluewill both be refs, no need to putauto&that'll just confuse the compiler.)libUvula/src/unwrap.cpp
Line 255 in 4eb68c5
libUvula/src/unwrap.cpp
Line 286 in 4eb68c5