Changeset 256491 in webkit


Ignore:
Timestamp:
Feb 12, 2020 4:31:41 PM (4 years ago)
Author:
commit-queue@webkit.org
Message:

Multiple GCC 10 build failures in ANGLE
https://bugs.webkit.org/show_bug.cgi?id=207365

Patch by Michael Catanzaro <Michael Catanzaro> on 2020-02-12
Reviewed by Carlos Alberto Lopez Perez.

  • changes.diff: Updated.
  • include/platform/Platform.h: Add missing #include to get size_t.
  • src/common/PackedEnums.h: Remove problematic const_casts.
Location:
trunk/Source/ThirdParty/ANGLE
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/ThirdParty/ANGLE/ChangeLog

    r256443 r256491  
     12020-02-12  Michael Catanzaro  <mcatanzaro@gnome.org>
     2
     3        Multiple GCC 10 build failures in ANGLE
     4        https://bugs.webkit.org/show_bug.cgi?id=207365
     5
     6        Reviewed by Carlos Alberto Lopez Perez.
     7
     8        * changes.diff: Updated.
     9        * include/platform/Platform.h: Add missing #include to get size_t.
     10        * src/common/PackedEnums.h: Remove problematic const_casts.
     11
    1122020-02-12  Dean Jackson  <dino@apple.com>
    213
  • trunk/Source/ThirdParty/ANGLE/changes.diff

    r256443 r256491  
    99099909-212a9ef90e21a98ff57ca301a60c84cbeca7be28
    99109910\ No newline at end of file
     9911diff --git a/include/platform/Platform.h b/include/platform/Platform.h
     9912index b603ff9bad2..f4ec4f8837c 100644
     9913--- a/include/platform/Platform.h
     9914+++ b/include/platform/Platform.h
     9915@@ -9,6 +9,7 @@
     9916 #ifndef ANGLE_PLATFORM_H
     9917 #define ANGLE_PLATFORM_H
     9918 
     9919+#include <stdlib.h>
     9920 #include <stdint.h>
     9921 #include <array>
     9922 
     9923diff --git a/src/common/PackedEnums.h b/src/common/PackedEnums.h
     9924index bd5fc340dcc..63368e25dfe 100644
     9925--- a/src/common/PackedEnums.h
     9926+++ b/src/common/PackedEnums.h
     9927@@ -83,10 +83,7 @@ class PackedEnumMap
     9928         // We use a for loop instead of range-for to work around a limitation in MSVC.
     9929         for (const InitPair *it = init.begin(); it != init.end(); ++it)
     9930         {
     9931-            // This horrible const_cast pattern is necessary to work around a constexpr limitation.
     9932-            // See https://stackoverflow.com/q/34199774/ . Note that it should be fixed with C++17.
     9933-            const_cast<T &>(const_cast<const Storage &>(
     9934-                mPrivateData)[static_cast<UnderlyingType>(it->first)]) = it->second;
     9935+            mPrivateData[static_cast<UnderlyingType>(it->first)] = it->second;
     9936         }
     9937     }
     9938 
  • trunk/Source/ThirdParty/ANGLE/include/platform/Platform.h

    r255782 r256491  
    1010#define ANGLE_PLATFORM_H
    1111
     12#include <stdlib.h>
    1213#include <stdint.h>
    1314#include <array>
  • trunk/Source/ThirdParty/ANGLE/src/common/PackedEnums.h

    r252989 r256491  
    8484        for (const InitPair *it = init.begin(); it != init.end(); ++it)
    8585        {
    86             // This horrible const_cast pattern is necessary to work around a constexpr limitation.
    87             // See https://stackoverflow.com/q/34199774/ . Note that it should be fixed with C++17.
    88             const_cast<T &>(const_cast<const Storage &>(
    89                 mPrivateData)[static_cast<UnderlyingType>(it->first)]) = it->second;
     86            mPrivateData[static_cast<UnderlyingType>(it->first)] = it->second;
    9087        }
    9188    }
Note: See TracChangeset for help on using the changeset viewer.