Follow-up Comment #2, bug #13810 (project freeciv): The "*(op->value.bval)" and similar expressions would make good candidates for wrapper macros, so that the internal field names can be easily updated in the future if needed.
Actually, probably static inline wrapper functions would be best, e.g.: /* In settings.h */ static inline bool setting_boolval(conct struct setting_s *op) { return *(op->value.bval); } /* And similarly for int, str. */ I would suggest to call the pointer union something other than "value", since it is not the value itself (recall you were confused by this a while ago). Perhaps "pvalue" or "valaddr" would be more fitting. ---------------------------------------------------------------- 全力を尽くして十分に成功する。 _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?13810> _______________________________________________ Message sent via/by Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev