[mutter/wip/lantw/monitor-transform-Don't-call-abs-on-non-negative-enum: 38/38] monitor-transform: Don't call abs on non-negative enum
- From: Robert Mader <rmader src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/lantw/monitor-transform-Don't-call-abs-on-non-negative-enum: 38/38] monitor-transform: Don't call abs on non-negative enum
- Date: Fri, 8 May 2020 17:27:56 +0000 (UTC)
commit 841ed19f52f5ad9b2fffb0f385ae88d23434a6b9
Author: Ting-Wei Lan <lantw src gnome org>
Date: Tue May 5 21:07:02 2020 +0800
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
src/backends/meta-monitor-transform.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/backends/meta-monitor-transform.h b/src/backends/meta-monitor-transform.h
index 6fca0a4e3..e5757e869 100644
--- a/src/backends/meta-monitor-transform.h
+++ b/src/backends/meta-monitor-transform.h
@@ -49,7 +49,7 @@ meta_monitor_transform_is_rotated (MetaMonitorTransform transform)
static inline gboolean
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]