COMMON: Revert attempt to silence MSVC warning in Common::gcd.

svn-id: r53506
This commit is contained in:
Johannes Schickel 2010-10-15 18:20:01 +00:00
parent e7ff1574ef
commit 4306a65577

View file

@ -242,19 +242,17 @@ void sort(T first, T last) {
*/ */
template<class T> template<class T>
T gcd(T a, T b) { T gcd(T a, T b) {
#ifdef _MSC_VER if (a <= 0)
if (a < 0) a = -a; a = -a;
if (b < 0) b = -b; if (b <= 0)
#else b = -b;
if (a <= 0) a = -a;
if (b <= 0) b = -b;
#endif
while (a > 0) { while (a > 0) {
T tmp = a; T tmp = a;
a = b % a; a = b % a;
b = tmp; b = tmp;
} }
return b; return b;
} }