Changeset 235966 in webkit


Ignore:
Timestamp:
Sep 12, 2018 7:14:05 PM (6 years ago)
Author:
Fujii Hironori
Message:

[Win][Clang][WebKitLegacy] Fix compilation errors and warnings of WebPreferences.cpp
https://bugs.webkit.org/show_bug.cgi?id=189538

Reviewed by Per Arne Vollan.

  • WebPreferences.cpp:

Changed the type of CFNumberTraits::Type from unsigned int to CFNumberType.
(WebPreferences::migrateWebKitPreferencesToCFPreferences):
Apply static_cast to the result of OR-ed CFPropertyListFormat.
(WebPreferences::screenFontSubstitutionEnabled):
Assign false to the content of the out variable 'enabled', not assigning 0 to the variable.

Location:
trunk/Source/WebKitLegacy/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKitLegacy/win/ChangeLog

    r235938 r235966  
     12018-09-12  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Win][Clang][WebKitLegacy] Fix compilation errors and warnings of WebPreferences.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=189538
     5
     6        Reviewed by Per Arne Vollan.
     7
     8        * WebPreferences.cpp:
     9        Changed the type of CFNumberTraits::Type from unsigned int to CFNumberType.
     10        (WebPreferences::migrateWebKitPreferencesToCFPreferences):
     11        Apply static_cast to the result of OR-ed CFPropertyListFormat.
     12        (WebPreferences::screenFontSubstitutionEnabled):
     13        Assign false to the content of the out variable 'enabled', not assigning 0 to the variable.
     14
    1152018-09-12  Fujii Hironori  <Hironori.Fujii@sony.com>
    216
  • trunk/Source/WebKitLegacy/win/WebPreferences.cpp

    r235539 r235966  
    6262}
    6363
    64 template<typename NumberType> struct CFNumberTraits { static const unsigned Type; };
    65 template<> struct CFNumberTraits<int> { static const unsigned Type = kCFNumberSInt32Type; };
    66 template<> struct CFNumberTraits<LONGLONG> { static const unsigned Type = kCFNumberLongLongType; };
    67 template<> struct CFNumberTraits<float> { static const unsigned Type = kCFNumberFloat32Type; };
     64template<typename NumberType> struct CFNumberTraits { static const CFNumberType Type; };
     65template<> struct CFNumberTraits<int> { static const CFNumberType Type = kCFNumberSInt32Type; };
     66template<> struct CFNumberTraits<LONGLONG> { static const CFNumberType Type = kCFNumberLongLongType; };
     67template<> struct CFNumberTraits<float> { static const CFNumberType Type = kCFNumberFloat32Type; };
    6868
    6969template<typename NumberType>
     
    516516        return;
    517517
    518     CFPropertyListFormat format = kCFPropertyListBinaryFormat_v1_0 | kCFPropertyListXMLFormat_v1_0;
     518    auto format = static_cast<CFPropertyListFormat>(kCFPropertyListBinaryFormat_v1_0 | kCFPropertyListXMLFormat_v1_0);
    519519    RetainPtr<CFPropertyListRef> plist = adoptCF(CFPropertyListCreateFromStream(0, stream.get(), 0, kCFPropertyListMutableContainersAndLeaves, &format, 0));
    520520    CFReadStreamClose(stream.get());
     
    13531353    if (!enabled)
    13541354        return E_POINTER;
    1355     enabled = false;
     1355    *enabled = false;
    13561356    return S_OK;
    13571357}
Note: See TracChangeset for help on using the changeset viewer.