diff options
author | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2018-06-29 21:40:20 +0200 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2018-06-30 11:23:52 +0200 |
commit | f091cc76d4782f8add6efd0b55b58c3c83711e32 (patch) | |
tree | c5f36c4bb75d59da46596b33dc1de1600a8e114e /android | |
parent | 8be74d03026a421b4cf4c5f8c3ede9998c61fd3d (diff) |
android: simplify boolean statement
Change-Id: I92cdccfe7b97d9baf29b1155990a38b26579e365
Diffstat (limited to 'android')
-rw-r--r-- | android/source/src/java/org/mozilla/gecko/gfx/RectUtils.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/android/source/src/java/org/mozilla/gecko/gfx/RectUtils.java b/android/source/src/java/org/mozilla/gecko/gfx/RectUtils.java index 8c1670f0f11f..e7fa540a390c 100644 --- a/android/source/src/java/org/mozilla/gecko/gfx/RectUtils.java +++ b/android/source/src/java/org/mozilla/gecko/gfx/RectUtils.java @@ -89,10 +89,9 @@ public final class RectUtils { public static boolean fuzzyEquals(RectF a, RectF b) { if (a == null && b == null) return true; - else if ((a == null && b != null) || (a != null && b == null)) - return false; else - return FloatUtils.fuzzyEquals(a.top, b.top) + return a != null && b != null + && FloatUtils.fuzzyEquals(a.top, b.top) && FloatUtils.fuzzyEquals(a.left, b.left) && FloatUtils.fuzzyEquals(a.right, b.right) && FloatUtils.fuzzyEquals(a.bottom, b.bottom); |