On 2/18/19 3:09 PM, Gabriel Ivăncescu wrote:
+static BOOL is_singlesel_NODATA(const LB_DESCR *descr) +{ + return (descr->style & (LBS_NODATA | LBS_MULTIPLESEL | LBS_EXTENDEDSEL)) == LBS_NODATA; +} + +static BOOL is_multisel_NODATA(const LB_DESCR *descr) +{ + return (descr->style & LBS_NODATA) && (descr->style & (LBS_MULTIPLESEL | LBS_EXTENDEDSEL)); +} +
This has to be consistent with existing IS_MULTISELECT(), both for naming and usage throughout the code. Could the same be achieved with IS_MULTISELECT() and direct style check for LBS_NODATA? Shortcuts with is_singlesel_NODATA() also seem avoidable, if we don't need to allocate anything in this case, can we just check for descr->items != NULL? That's basically what I was trying to suggest since first version of such helpers appeared.