diff options
author | Johannes Schickel | 2010-10-15 18:20:01 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-10-15 18:20:01 +0000 |
commit | 4306a6557769d7d7f42d45b81bd62d4b6a17283c (patch) | |
tree | 54ada836d1488c57a723d26a3acf7cae02c27278 /common | |
parent | e7ff1574efc0d69ba39c6e5acf27a1215a764048 (diff) | |
download | scummvm-rg350-4306a6557769d7d7f42d45b81bd62d4b6a17283c.tar.gz scummvm-rg350-4306a6557769d7d7f42d45b81bd62d4b6a17283c.tar.bz2 scummvm-rg350-4306a6557769d7d7f42d45b81bd62d4b6a17283c.zip |
COMMON: Revert attempt to silence MSVC warning in Common::gcd.
svn-id: r53506
Diffstat (limited to 'common')
-rw-r--r-- | common/algorithm.h | 12 |
1 files changed, 5 insertions, 7 deletions
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<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; } |