summaryrefslogtreecommitdiff
path: root/src/group.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-22 15:13:50 +0000
committersmatz <smatz@openttd.org>2009-05-22 15:13:50 +0000
commit62a7948af0ca9eb3b190a54918201e1075edcbbc (patch)
tree27a79b7850682cd43cac2462c3410ed8b567c4b2 /src/group.h
parent04723b240ebc7384954f73590be517ad2a47ce04 (diff)
downloadopenttd-62a7948af0ca9eb3b190a54918201e1075edcbbc.tar.xz
(svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved
Diffstat (limited to 'src/group.h')
-rw-r--r--src/group.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/group.h b/src/group.h
index 193568ca0..e60f66c43 100644
--- a/src/group.h
+++ b/src/group.h
@@ -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();
};