Change input and return types of inline function clamp() from int to int32_t.

git-svn-id: https://svn.eduke32.com/eduke32@2545 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2012-03-26 22:04:06 +00:00
parent 4d3e668352
commit ebaf65951b

View file

@ -396,9 +396,9 @@ static inline void dtol(double d, int32_t *a)
#endif
#if __GNUC__ >= 4
static inline __attribute__((warn_unused_result)) int clamp(int in, int min, int max)
static inline __attribute__((warn_unused_result)) int32_t clamp(int32_t in, int32_t min, int32_t max)
#else
static inline int clamp(int in, int min, int max)
static inline int32_t clamp(int32_t in, int32_t min, int32_t max)
#endif
{
return in <= min ? min : (in >= max ? max : in);