Changeset 220585 in webkit


Ignore:
Timestamp:
Aug 11, 2017 6:25:57 AM (7 years ago)
Author:
Adrian Perez de Castro
Message:

[WPE] Build failure with Clang 4.0.1: no matching conversion for functional-style cast from 'pointer' (aka 'unsigned short *') to 'WTF::String'
https://bugs.webkit.org/show_bug.cgi?id=175477

Reviewed by Žan Doberšek.

  • Shared/wpe/WebEventFactory.cpp:

(WebKit::singleCharacterStringForKeyEvent): Cast to UChar* to make
compiler choose the correct WTF::String constructor.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r220583 r220585  
     12017-08-11  Adrian Perez de Castro  <aperez@igalia.com>
     2
     3        [WPE] Build failure with Clang 4.0.1: no matching conversion for functional-style cast from 'pointer' (aka 'unsigned short *') to 'WTF::String'
     4        https://bugs.webkit.org/show_bug.cgi?id=175477
     5
     6        Reviewed by Žan Doberšek.
     7
     8        * Shared/wpe/WebEventFactory.cpp:
     9        (WebKit::singleCharacterStringForKeyEvent): Cast to UChar* to make
     10        compiler choose the correct WTF::String constructor.
     11
    1122017-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>
    213
  • trunk/Source/WebKit/Shared/wpe/WebEventFactory.cpp

    r216497 r220585  
    6060    GUniquePtr<gunichar2> uchar16(g_ucs4_to_utf16(&event->unicode, 1, 0, &length, nullptr));
    6161    if (uchar16)
    62         return String(uchar16.get());
     62        return String(reinterpret_cast<UChar*>(uchar16.get()), length);
    6363    return String();
    6464}
Note: See TracChangeset for help on using the changeset viewer.