From ae22bfda2ed86d5ba1623a7a23286eee13c9ae37 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <schaller@strw.leidenuniv.nl> Date: Thu, 2 Feb 2023 16:05:13 +0800 Subject: [PATCH] Change variable names inside our homemade sincos() implementation to fight against pedantic compilers --- src/sincos.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/sincos.h b/src/sincos.h index 6b36814d1f..340c8d7b84 100644 --- a/src/sincos.h +++ b/src/sincos.h @@ -41,11 +41,11 @@ * @param cos (return) The cosine of x. */ __attribute__((always_inline)) INLINE static void sincos(const double x, - double *sin, - double *cos) { + double *restrict s, + double *restrict c) { - *sin = sin(x); - *cos = cos(x); + *s = sin(x); + *c = cos(x); } #endif @@ -63,11 +63,11 @@ __attribute__((always_inline)) INLINE static void sincos(const double x, * @param cos (return) The cosine of x. */ __attribute__((always_inline)) INLINE static void sincosf(const float x, - float *sin, - float *cos) { + float *restrict s, + float *restrict c) { - *sin = sinf(x); - *cos = cosf(x); + *s = sinf(x); + *c = cosf(x); } #endif -- GitLab