From 65739f435088ff6d28f2e4baeb8404b1e4ad7836 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Sun, 7 Jan 2024 21:57:23 +0100 Subject: [PATCH] ff/{bb31,gl64}_t.cuh: harmonize unary operator-() implementations. --- ff/bb31_t.cuh | 4 ++-- ff/gl64_t.cuh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ff/bb31_t.cuh b/ff/bb31_t.cuh index 2bb3250..fb2a04f 100644 --- a/ff/bb31_t.cuh +++ b/ff/bb31_t.cuh @@ -104,10 +104,10 @@ public: return *this; } - friend inline bb31_t cneg(bb31_t a, bool flag) + static inline bb31_t cneg(bb31_t a, bool flag) { return a.cneg(flag); } inline bb31_t operator-() const - { bb31_t ret = *this; return ret.cneg(true); } + { return cneg(*this, true); } static inline const bb31_t one() { return bb31_t{ONE}; } inline bool is_one() const { return val == ONE; } diff --git a/ff/gl64_t.cuh b/ff/gl64_t.cuh index 9ea17d7..eb7164d 100644 --- a/ff/gl64_t.cuh +++ b/ff/gl64_t.cuh @@ -190,10 +190,10 @@ public: return *this; } - friend inline gl64_t cneg(gl64_t a, bool flag) + static inline gl64_t cneg(gl64_t a, bool flag) { return a.cneg(flag); } inline gl64_t operator-() const - { gl64_t ret = *this; return ret.cneg(true); } + { return cneg(*this, true); } static inline const gl64_t one() { gl64_t ret; ret.val = 1; return ret; }