From 63de75bed2f01970db5f76d4f0bb56aeada3834e Mon Sep 17 00:00:00 2001 From: Michael Hemmer Date: Tue, 9 Nov 2010 10:41:37 +0000 Subject: [PATCH] make it thread safe --- .../include/CGAL/Algebraic_structure_traits.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h b/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h index f68b2916164..875bfc63004 100644 --- a/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h +++ b/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h @@ -470,9 +470,7 @@ class Algebraic_structure_traits_base< Type_, Field_tag > : public std::unary_function< Type, Type > { public: Type operator()( const Type& x ) const { - //warning THIS IS NOT THREAD SAFE - static const Type& one = Type(1); - return one/x; + return Type(1)/x; } };