freebsd-ports/games/csmash/files/patch-loadparts.cpp
Eric Anholt 96bbb5fd30 Attempt to fix the build failure on i386 (now instead of amd64) in a more brute-
force fashion.  Instead of trying to get types right for this templated
function, just make the function (used exactly once) take and return longs.

Reported by:	krismail
2005-05-06 18:17:10 +00:00

12 lines
353 B
C++

--- loadparts.cpp.orig Wed May 4 19:19:33 2005
+++ loadparts.cpp Fri May 6 11:11:49 2005
@@ -69,8 +69,7 @@
return a <= x && x <= b;
}
-template <typename T>
-inline const T& clamp(const T& a, const T& x, const T& b) {
+inline const long clamp(long a, long x, long b) {
if (a > x) return a;
elif (b < x) return b;
else return x;