remove RF_SELECT code from split_allocations.

the flag was only ever written, never read.
This commit is contained in:
Enno Rehling 2017-03-23 19:32:17 +01:00
parent 485e8f0ce4
commit f941c5552f
1 changed files with 0 additions and 3 deletions

View File

@ -1170,7 +1170,6 @@ static allocate_function get_allocator(const struct resource_type *rtype)
void split_allocations(region * r) void split_allocations(region * r)
{ {
allocation_list **p_alist = &allocations; allocation_list **p_alist = &allocations;
freset(r, RF_SELECT);
while (*p_alist) { while (*p_alist) {
allocation_list *alist = *p_alist; allocation_list *alist = *p_alist;
const resource_type *rtype = alist->type; const resource_type *rtype = alist->type;
@ -1178,7 +1177,6 @@ void split_allocations(region * r)
const item_type *itype = resource2item(rtype); const item_type *itype = resource2item(rtype);
allocation **p_al = &alist->data; allocation **p_al = &alist->data;
freset(r, RF_SELECT);
alloc(rtype, r, alist->data); alloc(rtype, r, alist->data);
while (*p_al) { while (*p_al) {
@ -1187,7 +1185,6 @@ void split_allocations(region * r)
assert(itype || !"not implemented for non-items"); assert(itype || !"not implemented for non-items");
i_change(&al->unit->items, itype, al->get); i_change(&al->unit->items, itype, al->get);
produceexp(al->unit, itype->construction->skill, al->unit->number); produceexp(al->unit, itype->construction->skill, al->unit->number);
fset(r, RF_SELECT);
} }
if (al->want == INT_MAX) if (al->want == INT_MAX)
al->want = al->get; al->want = al->get;