Title: [288660] trunk/Source/WTF
- Revision
- 288660
- Author
- [email protected]
- Date
- 2022-01-26 18:53:13 -0800 (Wed, 26 Jan 2022)
Log Message
Build failure with GCC 12: MediaTime.h:167:71: error: call to non-'constexpr' function 'WTF::MediaTime& WTF::MediaTime::operator=(const WTF::MediaTime&)'
https://bugs.webkit.org/show_bug.cgi?id=235610
Patch by Michael Catanzaro <[email protected]> on 2022-01-26
Reviewed by Darin Adler.
The problem is the constexpr constructor calls the non-constexpr copy assignment operator.
This is easy to fix, at the expense of readability, by open-coding the desired values here.
* wtf/MediaTime.h:
(WTF::MediaTime::MediaTime):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (288659 => 288660)
--- trunk/Source/WTF/ChangeLog 2022-01-27 01:21:59 UTC (rev 288659)
+++ trunk/Source/WTF/ChangeLog 2022-01-27 02:53:13 UTC (rev 288660)
@@ -1,3 +1,16 @@
+2022-01-26 Michael Catanzaro <[email protected]>
+
+ Build failure with GCC 12: MediaTime.h:167:71: error: call to non-'constexpr' function 'WTF::MediaTime& WTF::MediaTime::operator=(const WTF::MediaTime&)'
+ https://bugs.webkit.org/show_bug.cgi?id=235610
+
+ Reviewed by Darin Adler.
+
+ The problem is the constexpr constructor calls the non-constexpr copy assignment operator.
+ This is easy to fix, at the expense of readability, by open-coding the desired values here.
+
+ * wtf/MediaTime.h:
+ (WTF::MediaTime::MediaTime):
+
2022-01-25 Eric Carlson <[email protected]>
[macOS] Add new screen and window capture backend
Modified: trunk/Source/WTF/wtf/MediaTime.h (288659 => 288660)
--- trunk/Source/WTF/wtf/MediaTime.h 2022-01-27 01:21:59 UTC (rev 288659)
+++ trunk/Source/WTF/wtf/MediaTime.h 2022-01-27 02:53:13 UTC (rev 288660)
@@ -164,7 +164,17 @@
if (scale || !(flags & Valid))
return;
- *this = value < 0 ? negativeInfiniteTime() : positiveInfiniteTime();
+ if (value < 0) {
+ // Negative infinite time
+ m_timeValue = -1;
+ m_timeScale = 1;
+ m_timeFlags = NegativeInfinite | Valid;
+ } else {
+ // Positive infinite time
+ m_timeValue = 0;
+ m_timeScale = 1;
+ m_timeFlags = PositiveInfinite | Valid;
+ }
}
inline MediaTime operator*(int32_t lhs, const MediaTime& rhs) { return rhs.operator*(lhs); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes