Cleanup: replace memcmp with BLI_rctf_compare

While in this case it's likely not an issue, in general using memcmp
for floating point values should be avoided.
This commit is contained in:
Campbell Barton
2023-06-20 14:21:44 +10:00
parent 2e087374d9
commit 4f3c09c5ee

View File

@@ -1855,7 +1855,7 @@ static float pack_islands_scale_margin(const Span<PackIsland *> islands,
rotate_inside_square(slow_aabbs, islands, params, scale, margin, r_phis, &extent);
}
if (!memcmp(&extent, &fast_extent, sizeof(rctf))) {
if (BLI_rctf_compare(&extent, &fast_extent, 0.0f)) {
/* The fast packer was the best so far. Lets just use the fast packer for everything. */
slow_aabbs = slow_aabbs.take_front(locked_island_count);
extent = locked_bounds;