From 4306a6557769d7d7f42d45b81bd62d4b6a17283c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 15 Oct 2010 18:20:01 +0000 Subject: COMMON: Revert attempt to silence MSVC warning in Common::gcd. svn-id: r53506 --- common/algorithm.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'common') diff --git a/common/algorithm.h b/common/algorithm.h index 917fafd639..b34d6f852d 100644 --- a/common/algorithm.h +++ b/common/algorithm.h @@ -242,19 +242,17 @@ void sort(T first, T last) { */ template T gcd(T a, T b) { -#ifdef _MSC_VER - if (a < 0) a = -a; - if (b < 0) b = -b; -#else - if (a <= 0) a = -a; - if (b <= 0) b = -b; -#endif + if (a <= 0) + a = -a; + if (b <= 0) + b = -b; while (a > 0) { T tmp = a; a = b % a; b = tmp; } + return b; } -- cgit v1.2.3