mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
clutter: Turn warning into assert
This warning is actually dead code, since should_be_mapped and must_be_realized are always set to the same value, so it does not make sense to check for "a && !b". Turn this into an assert so we avoid the dead branch, but do not remove the variable duplication so the more aptly named variable is used where it belongs, for clarity. CID: #1506254 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2061>
This commit is contained in:
parent
774f120ac4
commit
e50460e396
@ -1455,10 +1455,7 @@ clutter_actor_update_map_state (ClutterActor *self,
|
|||||||
/* Map */
|
/* Map */
|
||||||
if (should_be_mapped)
|
if (should_be_mapped)
|
||||||
{
|
{
|
||||||
if (!must_be_realized)
|
g_assert (should_be_mapped == must_be_realized);
|
||||||
g_warning ("Somehow we think actor '%s' should be mapped but "
|
|
||||||
"not realized, which isn't allowed",
|
|
||||||
_clutter_actor_get_debug_name (self));
|
|
||||||
|
|
||||||
/* realization is allowed to fail (though I don't know what
|
/* realization is allowed to fail (though I don't know what
|
||||||
* an app is supposed to do about that - shouldn't it just
|
* an app is supposed to do about that - shouldn't it just
|
||||||
|
Loading…
Reference in New Issue
Block a user