forked from AuroraMiddleware/gtk
bitmask: add an assertion
The static analysis in ci is complaining about this, since it doesn't know that start is always smaller than end.
This commit is contained in:
parent
92d42d4b67
commit
0f096d6ad9
@ -124,6 +124,8 @@ _gtk_bitmask_invert_range (GtkBitmask *mask,
|
|||||||
guint start,
|
guint start,
|
||||||
guint end)
|
guint end)
|
||||||
{
|
{
|
||||||
|
g_assert (start <= end);
|
||||||
|
|
||||||
if (_gtk_bitmask_is_allocated (mask) ||
|
if (_gtk_bitmask_is_allocated (mask) ||
|
||||||
(end > GTK_BITMASK_N_DIRECT_BITS))
|
(end > GTK_BITMASK_N_DIRECT_BITS))
|
||||||
return _gtk_allocated_bitmask_invert_range (mask, start, end);
|
return _gtk_allocated_bitmask_invert_range (mask, start, end);
|
||||||
|
Loading…
Reference in New Issue
Block a user