monitor-transform: Don't call abs on non-negative enum

It causes Clang to show a lot of warnings during compilation because it
thinks the abs call is useless.

https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1234
This commit is contained in:
Ting-Wei Lan 2020-05-05 21:07:02 +08:00 committed by Robert Mader
parent e06daa58c3
commit d823a54b5d

View File

@ -49,7 +49,7 @@ meta_monitor_transform_is_rotated (MetaMonitorTransform transform)
static inline gboolean static inline gboolean
meta_monitor_transform_is_flipped (MetaMonitorTransform transform) meta_monitor_transform_is_flipped (MetaMonitorTransform transform)
{ {
return (abs(transform) >= META_MONITOR_TRANSFORM_FLIPPED); return (transform >= META_MONITOR_TRANSFORM_FLIPPED);
} }
MetaMonitorTransform meta_monitor_transform_invert (MetaMonitorTransform transform); MetaMonitorTransform meta_monitor_transform_invert (MetaMonitorTransform transform);