12 #ifndef NEWGRF_STORAGE_H
13 #define NEWGRF_STORAGE_H
67 template <
typename TYPE, u
int SIZE>
100 if (pos >= SIZE)
return;
104 if (this->
storage[pos] == value)
return;
129 if (pos >= SIZE)
return 0;
151 template <
typename TYPE, u
int SIZE>
161 memset(this->
init, 0,
sizeof(this->
init));
173 if (pos >= SIZE)
return;
187 if (pos >= SIZE)
return 0;
203 memset(this->
init, 0,
sizeof(this->
init));
213 typedef uint32 PersistentStorageID;
218 extern PersistentStoragePool _persistent_storage_pool;
227 this->
grfid = new_grfid;
235 #define FOR_ALL_STORAGES_FROM(var, start) FOR_ALL_ITEMS_FROM(PersistentStorage, storage_index, var, start)
236 #define FOR_ALL_STORAGES(var) FOR_ALL_STORAGES_FROM(var, 0)