From f2da04573105942c4c6dc6e64e65281acb596850 Mon Sep 17 00:00:00 2001 From: smatz Date: Fri, 18 Jul 2008 21:01:30 +0000 Subject: (svn r13733) -Fix (r13731): gcc2.95 compilation --- src/oldpool_func.h | 4 ++-- src/player_base.h | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/oldpool_func.h b/src/oldpool_func.h index 4397d8443..8a26adc22 100644 --- a/src/oldpool_func.h +++ b/src/oldpool_func.h @@ -17,7 +17,7 @@ template *Tpool> T *PoolItemGetSize() - 1; - for (T *t = Tpool->Get(first); t != NULL; t = (t->index < last_minus_one) ? Tpool->Get(t->index + 1U) : NULL) { + for (T *t = Tpool->Get(first); t != NULL; t = ((uint)t->index < last_minus_one) ? Tpool->Get(t->index + 1U) : NULL) { if (!t->IsValid()) { first = t->index; Tid index = t->index; @@ -44,7 +44,7 @@ template *Tpool> bool PoolItemGetSize() - 1; - for (T *t = Tpool->Get(Tpool->first_free_index); t != NULL; t = (t->index < last_minus_one) ? Tpool->Get(t->index + 1U) : NULL) { + for (T *t = Tpool->Get(Tpool->first_free_index); t != NULL; t = ((uint)t->index < last_minus_one) ? Tpool->Get(t->index + 1U) : NULL) { if (!t->IsValid()) return true; Tpool->first_free_index = t->index; } diff --git a/src/player_base.h b/src/player_base.h index 6e175d127..e8c77344d 100644 --- a/src/player_base.h +++ b/src/player_base.h @@ -80,11 +80,9 @@ struct Player : PoolItem { inline bool IsValid() const { return this->name_1 != 0; } }; -inline bool operator < (PlayerID p, uint u) {return (uint)p < u;} - static inline bool IsValidPlayerID(PlayerID index) { - return index < GetPlayerPoolSize() && GetPlayer(index)->IsValid(); + return (uint)index < GetPlayerPoolSize() && GetPlayer(index)->IsValid(); } #define FOR_ALL_PLAYERS_FROM(d, start) for (d = GetPlayer(start); d != NULL; d = (d->index + 1U < GetPlayerPoolSize()) ? GetPlayer(d->index + 1U) : NULL) if (d->IsValid()) -- cgit v1.2.3-70-g09d2