[webkit-reviews] review granted: [Bug 235023] Fix C++20 build warnings with GCC : [Attachment 448722] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 10 11:41:38 PST 2022


Alex Christensen <achristensen at apple.com> has granted Lauro Moura
<lmoura at igalia.com>'s request for review:
Bug 235023: Fix C++20 build warnings with GCC
https://bugs.webkit.org/show_bug.cgi?id=235023

Attachment 448722: Patch

https://bugs.webkit.org/attachment.cgi?id=448722&action=review




--- Comment #3 from Alex Christensen <achristensen at apple.com> ---
Comment on attachment 448722
  --> https://bugs.webkit.org/attachment.cgi?id=448722
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=448722&action=review

> Source/JavaScriptCore/assembler/X86Assembler.h:338
> +	   return (TwoByteOpcodeID)(static_cast<int>(OP2_CMOVCC) +
static_cast<int>(cond));

I think instead of adding two static_casts, we could just move the cast to
static_cast<TwoByteOpcodeID>(cond)

> Source/WebCore/dom/ViewportArguments.h:77
> +    static constexpr int ValueAuto = -1;

Can we make this an enum class instead of just making them all an int with no
type?

> Source/WebCore/dom/WheelEvent.h:35
> +    static const char TickMultiplier = 120;

constexpr
Also char isn't great for this.  Could it be a size_t?

>
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cp
p:641
> +    static constexpr int MaxDimenstionForDirectCompositing = 2000;

float?


More information about the webkit-reviews mailing list