forked from github/server
turns out: btype->age is never used.
This commit is contained in:
parent
8928c9d3cf
commit
3b9a6e45a1
|
@ -70,7 +70,6 @@ extern "C" {
|
||||||
|
|
||||||
const char *(*name) (const struct building_type *,
|
const char *(*name) (const struct building_type *,
|
||||||
const struct building * b, int size);
|
const struct building * b, int size);
|
||||||
void(*age) (struct building *);
|
|
||||||
double(*taxes) (const struct building *, int level);
|
double(*taxes) (const struct building *, int level);
|
||||||
struct attrib *attribs;
|
struct attrib *attribs;
|
||||||
} building_type;
|
} building_type;
|
||||||
|
|
|
@ -296,7 +296,6 @@ static void test_btype_defaults(CuTest *tc) {
|
||||||
CuAssertPtrEquals(tc, 0, btype->maintenance);
|
CuAssertPtrEquals(tc, 0, btype->maintenance);
|
||||||
CuAssertPtrEquals(tc, 0, btype->construction);
|
CuAssertPtrEquals(tc, 0, btype->construction);
|
||||||
CuAssertTrue(tc, !btype->name);
|
CuAssertTrue(tc, !btype->name);
|
||||||
CuAssertTrue(tc, !btype->age);
|
|
||||||
CuAssertTrue(tc, !btype->taxes);
|
CuAssertTrue(tc, !btype->taxes);
|
||||||
CuAssertDblEquals(tc, 1.0, btype->auraregen, 0.0);
|
CuAssertDblEquals(tc, 1.0, btype->auraregen, 0.0);
|
||||||
CuAssertIntEquals(tc, -1, btype->maxsize);
|
CuAssertIntEquals(tc, -1, btype->maxsize);
|
||||||
|
|
|
@ -369,9 +369,6 @@ static int parse_buildings(xmlDocPtr doc)
|
||||||
(const char *(*)(const struct building_type *,
|
(const char *(*)(const struct building_type *,
|
||||||
const struct building *, int))fun;
|
const struct building *, int))fun;
|
||||||
}
|
}
|
||||||
else if (strcmp((const char *)propValue, "age") == 0) {
|
|
||||||
btype->age = (void(*)(struct building *))fun;
|
|
||||||
}
|
|
||||||
else if (strcmp((const char *)propValue, "taxes") == 0) {
|
else if (strcmp((const char *)propValue, "taxes") == 0) {
|
||||||
btype->taxes = (double(*)(const struct building *, int))fun;
|
btype->taxes = (double(*)(const struct building *, int))fun;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2883,10 +2883,6 @@ static building *age_building(building * b)
|
||||||
a_age(&b->attribs, b);
|
a_age(&b->attribs, b);
|
||||||
handle_event(b->attribs, "timer", b);
|
handle_event(b->attribs, "timer", b);
|
||||||
|
|
||||||
if (b->type->age) {
|
|
||||||
b->type->age(b);
|
|
||||||
}
|
|
||||||
|
|
||||||
return b;
|
return b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue