Hmm, by that definition a number or index of structures may use size_t. Just not a number of millimetres.
(1) So in the least size_t needs to be removed from:
mir_output_get_physical_height_mm mir_output_get_physical_width_mm
(2) Also this is not portable since some platforms won't have sizeof(unsigned long) == sizeof(size_t):
219 - int output_id; 220 - if (++action < action_end && 1 == sscanf(*action, "%d", &output_id)) 221 + size_t output_id; 222 + if (++action < action_end && 1 == sscanf(*action, "%lu", &output_id))
(3) To avoid forcing downstreams to cast, it would be helpful to make this int or ssize_t:
current_mode_index preferred_mode_index
because they are allowed to be and often are negative.
« Back to merge proposal
Hmm, by that definition a number or index of structures may use size_t. Just not a number of millimetres.
(1) So in the least size_t needs to be removed from:
mir_ output_ get_physical_ height_ mm output_ get_physical_ width_mm
mir_
(2) Also this is not portable since some platforms won't have sizeof(unsigned long) == sizeof(size_t):
219 - int output_id;
220 - if (++action < action_end && 1 == sscanf(*action, "%d", &output_id))
221 + size_t output_id;
222 + if (++action < action_end && 1 == sscanf(*action, "%lu", &output_id))
(3) To avoid forcing downstreams to cast, it would be helpful to make this int or ssize_t:
current_ mode_index mode_index
preferred_
because they are allowed to be and often are negative.