cleanup: functions do not need to be dereferenced with an & in C.

This commit is contained in:
Enno Rehling 2015-11-03 13:24:58 +01:00
parent 7e81b98fa4
commit 91a6324a97
3 changed files with 17 additions and 17 deletions

View File

@ -547,25 +547,25 @@ void register_tolua_helpers(void)
at_register(&at_direction); at_register(&at_direction);
at_register(&at_building_action); at_register(&at_building_action);
register_function((pf_generic)& lua_building_taxes, register_function((pf_generic)lua_building_taxes,
TOLUA_CAST "lua_building_taxes"); TOLUA_CAST "lua_building_taxes");
register_function((pf_generic)& lua_agebuilding, register_function((pf_generic)lua_agebuilding,
TOLUA_CAST "lua_agebuilding"); TOLUA_CAST "lua_agebuilding");
register_function((pf_generic)& lua_callspell, TOLUA_CAST "lua_castspell"); register_function((pf_generic)lua_callspell, TOLUA_CAST "lua_castspell");
register_function((pf_generic)& lua_initfamiliar, register_function((pf_generic)lua_initfamiliar,
TOLUA_CAST "lua_initfamiliar"); TOLUA_CAST "lua_initfamiliar");
register_item_use(&lua_useitem, TOLUA_CAST "lua_useitem"); register_item_use(&lua_useitem, TOLUA_CAST "lua_useitem");
register_function((pf_generic)& lua_getresource, register_function((pf_generic)lua_getresource,
TOLUA_CAST "lua_getresource"); TOLUA_CAST "lua_getresource");
register_function((pf_generic)& lua_canuse_item, register_function((pf_generic)lua_canuse_item,
TOLUA_CAST "lua_canuse_item"); TOLUA_CAST "lua_canuse_item");
register_function((pf_generic)& lua_changeresource, register_function((pf_generic)lua_changeresource,
TOLUA_CAST "lua_changeresource"); TOLUA_CAST "lua_changeresource");
register_function((pf_generic)& lua_equipmentcallback, register_function((pf_generic)lua_equipmentcallback,
TOLUA_CAST "lua_equip"); TOLUA_CAST "lua_equip");
register_function((pf_generic)& lua_wage, TOLUA_CAST "lua_wage"); register_function((pf_generic)lua_wage, TOLUA_CAST "lua_wage");
register_function((pf_generic)& lua_maintenance, register_function((pf_generic)lua_maintenance,
TOLUA_CAST "lua_maintenance"); TOLUA_CAST "lua_maintenance");
register_function((pf_generic)produce_resource, register_function((pf_generic)produce_resource,

View File

@ -357,14 +357,14 @@ static int meropis_building_protection(building * b, unit * u)
void register_buildings(void) void register_buildings(void)
{ {
register_function((pf_generic)& building_protection, register_function((pf_generic)building_protection,
"building_protection"); "building_protection");
register_function((pf_generic)& meropis_building_protection, register_function((pf_generic)meropis_building_protection,
"meropis_building_protection"); "meropis_building_protection");
register_function((pf_generic)& init_smithy, "init_smithy"); register_function((pf_generic)init_smithy, "init_smithy");
register_function((pf_generic)& castle_name, "castle_name"); register_function((pf_generic)castle_name, "castle_name");
register_function((pf_generic)& castle_name_2, "castle_name_2"); register_function((pf_generic)castle_name_2, "castle_name_2");
register_function((pf_generic)& fort_name, "fort_name"); register_function((pf_generic)fort_name, "fort_name");
} }
void write_building_reference(const struct building *b, struct storage *store) void write_building_reference(const struct building *b, struct storage *store)

View File

@ -1591,7 +1591,7 @@ void attrib_init(void)
register_bordertype(&bt_illusionwall); register_bordertype(&bt_illusionwall);
register_bordertype(&bt_road); register_bordertype(&bt_road);
register_function((pf_generic)& minimum_wage, "minimum_wage"); register_function((pf_generic)minimum_wage, "minimum_wage");
at_register(&at_germs); at_register(&at_germs);