aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJohannes Schickel2010-10-15 18:20:01 +0000
committerJohannes Schickel2010-10-15 18:20:01 +0000
commit4306a6557769d7d7f42d45b81bd62d4b6a17283c (patch)
tree54ada836d1488c57a723d26a3acf7cae02c27278 /common
parente7ff1574efc0d69ba39c6e5acf27a1215a764048 (diff)
downloadscummvm-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.h12
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;
}