Update Kernel_23/include/CGAL/Kernel/hash_functions.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Laurent Rineau 2025-10-31 15:40:42 +01:00 committed by GitHub
parent f508d6fe1d
commit 2a5351cc0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -83,8 +83,10 @@ hash_value (const Aff_transformation_2<K>& transform)
{ {
std::size_t result = hash_value(transform.cartesian(0,0)); std::size_t result = hash_value(transform.cartesian(0,0));
for(int i=0; i < 3; ++i) for(int i=0; i < 3; ++i)
for(int j = (i == 0 ? 1 : 0); j < 3; ++j) for(int j=0; j < 3; ++j)
boost::hash_combine(result, hash_value(transform.cartesian(i,j))); // Skip (0,0) as it was already used to initialize the hash
if (!(i == 0 && j == 0))
boost::hash_combine(result, hash_value(transform.cartesian(i,j)));
return result; return result;
} }