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:
Matthias Clasen 2020-05-25 17:18:27 -04:00
parent 92d42d4b67
commit 0f096d6ad9

View File

@ -124,6 +124,8 @@ _gtk_bitmask_invert_range (GtkBitmask *mask,
guint start,
guint end)
{
g_assert (start <= end);
if (_gtk_bitmask_is_allocated (mask) ||
(end > GTK_BITMASK_N_DIRECT_BITS))
return _gtk_allocated_bitmask_invert_range (mask, start, end);