[Freeciv-Dev] Re: (PR#1935) client option change callback
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Per I. Mathisen via RT wrote:
> Why is the argument to the new callback a client_options struct, and not
> just a simple string?
Why not? Passing the full struct pointer takes minimal overhead. In
some cases it would allow the same function to be used as callback for
multiple options. In most cases it won't matter at all.
Ahh, but the real reason is: the change callback can be used for either
COT_BOOL, COT_INT, or COT_STRING. So passing a single value (unless
it's a void* and we let the callback figure it out) won't work.
jason
|
|