(svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved

This commit is contained in:
smatz
2009-05-22 15:13:50 +00:00
parent 04723b240e
commit 62a7948af0
69 changed files with 834 additions and 995 deletions

View File

@@ -6,14 +6,15 @@
#define GROUP_H
#include "group_type.h"
#include "oldpool.h"
#include "core/pool.hpp"
#include "company_type.h"
#include "vehicle_type.h"
#include "engine_type.h"
DECLARE_OLD_POOL(Group, Group, 5, 2047)
typedef Pool<Group, GroupID, 16, 64000> GroupPool;
extern GroupPool _group_pool;
struct Group : PoolItem<Group, GroupID, &_Group_pool> {
struct Group : GroupPool::PoolItem<&_group_pool> {
char *name; ///< Group Name
uint16 num_vehicle; ///< Number of vehicles wich belong to the group
@@ -24,9 +25,7 @@ struct Group : PoolItem<Group, GroupID, &_Group_pool> {
uint16 *num_engines; ///< Caches the number of engines of each type the company owns (no need to save this)
Group(CompanyID owner = INVALID_COMPANY);
virtual ~Group();
bool IsValid() const;
~Group();
};