[Scummvm-cvs-logs] SF.net SVN: scummvm:[53506] scummvm/trunk/common/algorithm.h
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Fri Oct 15 20:20:01 CEST 2010
Revision: 53506
http://scummvm.svn.sourceforge.net/scummvm/?rev=53506&view=rev
Author: lordhoto
Date: 2010-10-15 18:20:01 +0000 (Fri, 15 Oct 2010)
Log Message:
-----------
COMMON: Revert attempt to silence MSVC warning in Common::gcd.
Modified Paths:
--------------
scummvm/trunk/common/algorithm.h
Modified: scummvm/trunk/common/algorithm.h
===================================================================
--- scummvm/trunk/common/algorithm.h 2010-10-15 15:51:59 UTC (rev 53505)
+++ scummvm/trunk/common/algorithm.h 2010-10-15 18:20:01 UTC (rev 53506)
@@ -242,19 +242,17 @@
*/
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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list