4 Mar
2026
4 Mar
'26
2:53 a.m.
Rémi Bernon (@rbernon) commented about dlls/opengl32/unix_wgl.c:
+ return (int)a1->name - (int)a2->name; +}; + +static const struct context_attribute_desc *find_context_attribute( GLenum name ) +{ + unsigned int l = 0, r = ARRAY_SIZE(context_attributes), m; + + while (l < r) + { + m = (l + r) /2; + if (context_attributes[m].name == name) return &context_attributes[m]; + if (name < context_attributes[m].name) r = m; + else l = m + 1; + } + return NULL; +} Why not use bsearch as we already have everything we need from qsort?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10241#note_131206