From a78dff1806a8edc78af6e830ef28f080f32832b0 Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 29 Jun 2016 11:55:03 +0200 Subject: [PATCH] Remove the call of the function get_static_check_fpu_rounding_mode_is_restored from FPU_set_cw; use a const variable instead. --- Number_types/include/CGAL/FPU.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index 646a8d75b03..09b9a1134f4 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -135,6 +135,10 @@ const double infinity = HUGE_VAL; struct Check_FPU_rounding_mode_is_restored; inline const Check_FPU_rounding_mode_is_restored& get_static_check_fpu_rounding_mode_is_restored(); +namespace { + CGAL_DEPRECATED_UNUSED const Check_FPU_rounding_mode_is_restored & + check_fpu_rounding_mode_is_restored = get_static_check_fpu_rounding_mode_is_restored(); +} #endif // Inline function to stop compiler optimizations that shouldn't happen with @@ -422,17 +426,6 @@ inline void FPU_set_cw (FPU_CW_t cw) { -#ifndef CGAL_NDEBUG -#ifdef CGAL_HEADER_ONLY - // Call the get_static_check_fpu_rounding_mode_is_restored() - // function called so that the test located in the destructor - // of Check_FPU_rounding_mode_is_restored is run - const Check_FPU_rounding_mode_is_restored & tmp = - get_static_check_fpu_rounding_mode_is_restored(); - CGAL_USE(tmp); -#endif -#endif - CGAL_IA_SETFPCW(cw); }