diff options
author | Johannes Schickel | 2010-10-15 14:18:58 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-10-15 14:18:58 +0000 |
commit | 5c102d4f082e6e05048cb06e87ff40a17c43207d (patch) | |
tree | d6846be228f3c6308192a1b11ac5a3d51f81d24e | |
parent | 8fc3c21bd0d2b3030284c3be4656240bff37d667 (diff) | |
download | scummvm-rg350-5c102d4f082e6e05048cb06e87ff40a17c43207d.tar.gz scummvm-rg350-5c102d4f082e6e05048cb06e87ff40a17c43207d.tar.bz2 scummvm-rg350-5c102d4f082e6e05048cb06e87ff40a17c43207d.zip |
COMMON: Silence gcc warning introduced with r53496.
svn-id: r53497
-rw-r--r-- | common/algorithm.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/algorithm.h b/common/algorithm.h index 67ffe122f9..917fafd639 100644 --- a/common/algorithm.h +++ b/common/algorithm.h @@ -242,8 +242,14 @@ 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 + while (a > 0) { T tmp = a; a = b % a; |