Changeset - r7104:515beedd422b
[Not reviewed]
master
0 1 0
peter1138 - 17 years ago 2007-06-28 11:53:22
peter1138@openttd.org
(svn r10371) -Fix (r9874): Remove never-used GetGroupName() function
1 file changed with 0 insertions and 8 deletions:
0 comments (0 inline, 0 general)
src/group.h
Show inline comments
 
@@ -44,32 +44,24 @@ static inline void DeleteGroup(Group *g)
 
}
 

	
 
static inline bool IsValidGroupID(GroupID index)
 
{
 
	return index < GetGroupPoolSize() && IsValidGroup(GetGroup(index));
 
}
 

	
 
static inline bool IsDefaultGroupID(GroupID index)
 
{
 
	return (index == DEFAULT_GROUP);
 
}
 

	
 
static inline StringID GetGroupName(GroupID index)
 
{
 
	if (!IsValidGroupID(index)) return STR_NULL;
 

	
 
	return GetGroup(index)->string_id;
 
}
 

	
 

	
 
#define FOR_ALL_GROUPS_FROM(g, start) for (g = GetGroup(start); g != NULL; g = (g->index + 1U < GetGroupPoolSize()) ? GetGroup(g->index + 1) : NULL) if (IsValidGroup(g))
 
#define FOR_ALL_GROUPS(g) FOR_ALL_GROUPS_FROM(g, 0)
 

	
 
/**
 
 * Get the current size of the GroupPool
 
 */
 
static inline uint GetGroupArraySize(void)
 
{
 
	const Group *g;
 
	uint num = 0;
 

	
 
	FOR_ALL_GROUPS(g) num++;
0 comments (0 inline, 0 general)