Changeset 161903 in webkit


Ignore:
Timestamp:
Jan 13, 2014 12:56:04 PM (10 years ago)
Author:
dbates@webkit.org
Message:

Add uint8_t specialization for WebCore::writeLittleEndian()
https://bugs.webkit.org/show_bug.cgi?id=126924

Reviewed by Darin Adler.

Specialize WebCore::writeLittleEndian() for datatype uint8_t so as to avoid
a compiler warning when right shifting a uint8_t by 8 because the result of
such a computation is undefined.

  • bindings/js/SerializedScriptValue.cpp:

(WebCore::writeLittleEndian<uint8_t>): Added.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r161901 r161903  
     12014-01-13  Daniel Bates  <dabates@apple.com>
     2
     3        Add uint8_t specialization for WebCore::writeLittleEndian()
     4        https://bugs.webkit.org/show_bug.cgi?id=126924
     5
     6        Reviewed by Darin Adler.
     7
     8        Specialize WebCore::writeLittleEndian() for datatype uint8_t so as to avoid
     9        a compiler warning when right shifting a uint8_t by 8 because the result of
     10        such a computation is undefined.
     11
     12        * bindings/js/SerializedScriptValue.cpp:
     13        (WebCore::writeLittleEndian<uint8_t>): Added.
     14
    1152014-01-13  Daniel Bates  <dabates@apple.com>
    216
  • trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp

    r161851 r161903  
    426426}
    427427
     428template <> bool writeLittleEndian<uint8_t>(Vector<uint8_t>& buffer, const uint8_t* values, uint32_t length)
     429{
     430    buffer.append(values, length);
     431    return true;
     432}
     433
    428434class CloneSerializer : CloneBase {
    429435public:
Note: See TracChangeset for help on using the changeset viewer.