From fc4f32f8e0044d5d62d4947906b78659002c4be2 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Thu, 1 Nov 2018 21:13:05 +0100 Subject: [PATCH] read_building_reference does not need a callback --- src/kernel/building.c | 4 ++-- src/kernel/building.h | 2 +- src/modules/xmas.c | 2 +- src/triggers/gate.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/kernel/building.c b/src/kernel/building.c index 3a3d7e4e5..8cbe5c180 100644 --- a/src/kernel/building.c +++ b/src/kernel/building.c @@ -359,7 +359,7 @@ void resolve_building(building *b) resolve(RESOLVE_BUILDING | b->no, b); } -int read_building_reference(gamedata * data, building **bp, resolve_fun fun) +int read_building_reference(gamedata * data, building **bp) { int id; READ_INT(data->store, &id); @@ -367,7 +367,7 @@ int read_building_reference(gamedata * data, building **bp, resolve_fun fun) *bp = findbuilding(id); if (*bp == NULL) { *bp = NULL; - ur_add(RESOLVE_BUILDING | id, (void**)bp, fun); + ur_add(RESOLVE_BUILDING | id, (void**)bp, NULL); } } else { diff --git a/src/kernel/building.h b/src/kernel/building.h index af605b448..2a0a77cde 100644 --- a/src/kernel/building.h +++ b/src/kernel/building.h @@ -166,7 +166,7 @@ extern "C" { void resolve_building(building *b); void write_building_reference(const struct building *b, struct storage *store); - int read_building_reference(struct gamedata * data, struct building **bp, resolve_fun fun); + int read_building_reference(struct gamedata * data, struct building **bp); struct building *findbuilding(int n); diff --git a/src/modules/xmas.c b/src/modules/xmas.c index aa296866a..a8b87026a 100644 --- a/src/modules/xmas.c +++ b/src/modules/xmas.c @@ -50,7 +50,7 @@ static void xmasgate_write(const trigger * t, struct storage *store) static int xmasgate_read(trigger * t, struct gamedata *data) { - if (read_building_reference(data, (building **)&t->data.v, NULL) <= 0) { + if (read_building_reference(data, (building **)&t->data.v) <= 0) { return AT_READ_FAIL; } return AT_READ_OK; diff --git a/src/triggers/gate.c b/src/triggers/gate.c index bd67e56f4..ac3e44b88 100644 --- a/src/triggers/gate.c +++ b/src/triggers/gate.c @@ -75,7 +75,7 @@ static void gate_write(const trigger * t, struct storage *store) static int gate_read(trigger * t, gamedata *data) { gate_data *gd = (gate_data *)t->data.v; - int bc = read_building_reference(data, &gd->gate, NULL); + int bc = read_building_reference(data, &gd->gate); int rc = read_region_reference(data, &gd->target); if (bc <= 0 && rc <= 0) {