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-gcc8-r588316.patch

99 lines
4.5 KiB

From 87902b3202f81d689dd314c17006ffc907fe12a1 Mon Sep 17 00:00:00 2001
From: Wang Qing <wangqing-hf@loongson.cn>
Date: Mon, 3 Sep 2018 02:41:08 +0000
Subject: [PATCH] Fix build error for blink.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This CLs fixed the error of constexpr function call to non-constexpr function.
Bug: 878202
Change-Id: I6ad217a687e62a9a384980d852743a56479de3a9
Reviewed-on: https://chromium-review.googlesource.com/1192467
Commit-Queue: 汪 清 <wangqing-hf@loongson.cn>
Reviewed-by: Eric Willigers <ericwilligers@chromium.org>
Cr-Commit-Position: refs/heads/master@{#588316}
---
.../core/animation/animation_time_delta.cc | 22 ++++++++++++++
.../core/animation/animation_time_delta.h | 30 +++++++------------
2 files changed, 32 insertions(+), 20 deletions(-)
diff --git a/third_party/blink/renderer/core/animation/animation_time_delta.cc b/third_party/blink/renderer/core/animation/animation_time_delta.cc
index 1b25469c7f2f..2e30a18890da 100644
--- a/third_party/blink/renderer/core/animation/animation_time_delta.cc
+++ b/third_party/blink/renderer/core/animation/animation_time_delta.cc
@@ -7,6 +7,28 @@
namespace blink {
#if !defined(BLINK_ANIMATION_USE_TIME_DELTA)
+// Comparison operators on AnimationTimeDelta.
+bool CORE_EXPORT operator==(const AnimationTimeDelta& lhs,
+ const AnimationTimeDelta& rhs) {
+ return lhs.InSecondsF() == rhs.InSecondsF();
+}
+bool CORE_EXPORT operator!=(const AnimationTimeDelta& lhs,
+ const AnimationTimeDelta& rhs) {
+ return lhs.InSecondsF() != rhs.InSecondsF();
+}
+bool CORE_EXPORT operator>(const AnimationTimeDelta& lhs,
+ const AnimationTimeDelta& rhs) {
+ return lhs.InSecondsF() > rhs.InSecondsF();
+}
+bool CORE_EXPORT operator>=(const AnimationTimeDelta& lhs,
+ const AnimationTimeDelta& rhs) {
+ return lhs.InSecondsF() >= rhs.InSecondsF();
+}
+bool CORE_EXPORT operator<=(const AnimationTimeDelta& lhs,
+ const AnimationTimeDelta& rhs) {
+ return lhs.InSecondsF() <= rhs.InSecondsF();
+}
+
std::ostream& operator<<(std::ostream& os, AnimationTimeDelta time) {
return os << time.InSecondsF() << " s";
}
diff --git a/third_party/blink/renderer/core/animation/animation_time_delta.h b/third_party/blink/renderer/core/animation/animation_time_delta.h
index 1903c1150d3e..95d218466d90 100644
--- a/third_party/blink/renderer/core/animation/animation_time_delta.h
+++ b/third_party/blink/renderer/core/animation/animation_time_delta.h
@@ -90,26 +90,16 @@ AnimationTimeDelta operator*(T a, AnimationTimeDelta td) {
}
// Comparison operators on AnimationTimeDelta.
-constexpr bool CORE_EXPORT operator==(const AnimationTimeDelta& lhs,
- const AnimationTimeDelta& rhs) {
- return lhs.InSecondsF() == rhs.InSecondsF();
-}
-constexpr bool CORE_EXPORT operator!=(const AnimationTimeDelta& lhs,
- const AnimationTimeDelta& rhs) {
- return lhs.InSecondsF() != rhs.InSecondsF();
-}
-constexpr bool CORE_EXPORT operator>(const AnimationTimeDelta& lhs,
- const AnimationTimeDelta& rhs) {
- return lhs.InSecondsF() > rhs.InSecondsF();
-}
-constexpr bool CORE_EXPORT operator>=(const AnimationTimeDelta& lhs,
- const AnimationTimeDelta& rhs) {
- return lhs.InSecondsF() >= rhs.InSecondsF();
-}
-constexpr bool CORE_EXPORT operator<=(const AnimationTimeDelta& lhs,
- const AnimationTimeDelta& rhs) {
- return lhs.InSecondsF() <= rhs.InSecondsF();
-}
+bool CORE_EXPORT operator==(const AnimationTimeDelta& lhs,
+ const AnimationTimeDelta& rhs);
+bool CORE_EXPORT operator!=(const AnimationTimeDelta& lhs,
+ const AnimationTimeDelta& rhs);
+bool CORE_EXPORT operator>(const AnimationTimeDelta& lhs,
+ const AnimationTimeDelta& rhs);
+bool CORE_EXPORT operator>=(const AnimationTimeDelta& lhs,
+ const AnimationTimeDelta& rhs);
+bool CORE_EXPORT operator<=(const AnimationTimeDelta& lhs,
+ const AnimationTimeDelta& rhs);
// Defined to allow DCHECK_EQ/etc to work with the class.
CORE_EXPORT std::ostream& operator<<(std::ostream& os, AnimationTimeDelta time);
--
2.17.2