From 2a5351cc0a0d378f3defa0ddb2b1e53d6debed23 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 31 Oct 2025 15:40:42 +0100 Subject: [PATCH] Update Kernel_23/include/CGAL/Kernel/hash_functions.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- Kernel_23/include/CGAL/Kernel/hash_functions.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Kernel_23/include/CGAL/Kernel/hash_functions.h b/Kernel_23/include/CGAL/Kernel/hash_functions.h index 224483c492b..2a2e42ba710 100644 --- a/Kernel_23/include/CGAL/Kernel/hash_functions.h +++ b/Kernel_23/include/CGAL/Kernel/hash_functions.h @@ -83,8 +83,10 @@ hash_value (const Aff_transformation_2& transform) { std::size_t result = hash_value(transform.cartesian(0,0)); for(int i=0; i < 3; ++i) - for(int j = (i == 0 ? 1 : 0); j < 3; ++j) - boost::hash_combine(result, hash_value(transform.cartesian(i,j))); + for(int j=0; j < 3; ++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; }