]> git.pond.sub.org Git - empserver/commit
Simplify buil(): replace a switch by a function pointer
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 23 Apr 2011 06:34:35 +0000 (08:34 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 23 Apr 2011 16:11:42 +0000 (18:11 +0200)
commit98a9b53c0f74d92566cc2563b0d5a161614e81ea
treef834453232d9395771cc0dbbe35296fbb307c3fd
parent8f6c4f18d7bde1fce1cdfa7b201734abd76a5a4d
Simplify buil(): replace a switch by a function pointer

To enable that, make build_ship() & friends all take the same int type
argument instead of each one its own pointer.  Passing pointers
triggered "may be used uninitialized" compiler warnings (the code was
safe despite the warnings).
src/lib/commands/buil.c