18 #ifdef ADV_CHOICE_TRACK
19 #define ADV_CHOICE_QtMsgType LOG_NORMAL
36 #ifdef ADV_CHOICE_TRACK
55 #ifdef ADV_CHOICE_TRACK
69 #define adv_choice_set_use(_choice, _use)
70 #define adv_choice_log_info(_choice, _loc1, _loc2)
77 #define ADV_CHOICE_ASSERT(c) \
80 fc_assert((c).type > CT_NONE && (c).type < CT_LAST); \
81 if (!is_unit_choice_type((c).type)) { \
82 int _iindex = improvement_index((c).value.building); \
83 fc_assert(_iindex >= 0 && _iindex < improvement_count()); \
85 int _uindex = utype_index((c).value.utype); \
86 fc_assert(_uindex >= 0 && _uindex < utype_count()); \
void adv_deinit_choice(struct adv_choice *choice)
Clear choice without freeing it itself.
#define adv_choice_set_use(_choice, _use)
void adv_init_choice(struct adv_choice *choice)
Sets the values of the choice to initial values.
struct adv_choice * adv_new_choice()
Dynamically allocate a new choice.
void adv_free_choice(struct adv_choice *choice)
Free dynamically allocated choice.
static void adv_choice_copy(struct adv_choice *dest, struct adv_choice *src)
struct adv_choice * adv_better_choice(struct adv_choice *first, struct adv_choice *second)
Return better one of the choices given.
static const char * adv_choice_get_use(const struct adv_choice *choice)
struct adv_choice * adv_better_choice_free(struct adv_choice *first, struct adv_choice *second)
Return better one of the choices given, and free the other.
bool is_unit_choice_type(enum choice_type type)
Does choice type refer to unit.
#define adv_choice_log_info(_choice, _loc1, _loc2)