You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chromium/chromium-84-gcc-DOMRect-con...

30 lines
1.1 KiB

5 years ago
From 62f633b8ca2b2376ca3273e6df910feb4bd93578 Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Wed, 27 May 2020 19:23:12 +0000
Subject: [PATCH] GCC: DOMRect constexpr equal operator depends on non constexpr operators
Make operators 'inline' only.
Bug: 819294
Change-Id: If07442258b4ebce26c013c4dff830c1d61dff9e3
---
diff --git a/third_party/blink/renderer/core/geometry/dom_rect.h b/third_party/blink/renderer/core/geometry/dom_rect.h
index fede005..058c60a 100644
--- a/third_party/blink/renderer/core/geometry/dom_rect.h
+++ b/third_party/blink/renderer/core/geometry/dom_rect.h
@@ -34,11 +34,11 @@
void setHeight(double height) { height_ = height; }
};
-constexpr bool operator==(const DOMRect& lhs, const DOMRect& rhs) {
+inline bool operator==(const DOMRect& lhs, const DOMRect& rhs) {
return lhs.x() == rhs.x() && lhs.y() == rhs.y() &&
lhs.width() == rhs.width() && lhs.height() == rhs.height();
}
-constexpr bool operator!=(const DOMRect& lhs, const DOMRect& rhs) {
+inline bool operator!=(const DOMRect& lhs, const DOMRect& rhs) {
return !(lhs == rhs);
}
} // namespace blink