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>
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;
}