openbsd-ports/games/csmash/patches/patch-loadparts_cpp
jdixon a63eb5aa25 Cannon Smash is a 3D table tennis game. The goal of the project is
to provide a computer game rendition of table tennis that allows the 
use of various strategies available in the real game.

Adapted from the FreeBSD port.

Input from okan, martynas, landry, ajacoutot
Tested by many
ok landry@ ajacoutot@
2008-07-06 20:43:20 +00:00

14 lines
481 B
Plaintext

$OpenBSD: patch-loadparts_cpp,v 1.1.1.1 2008/07/06 20:43:20 jdixon Exp $
--- loadparts.cpp.orig Wed Nov 19 11:49:31 2003
+++ loadparts.cpp Fri Jul 4 22:09:49 2008
@@ -69,8 +69,7 @@ inline bool between(const T& a, const T& x, const T& b
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;