Changeset 220567 in webkit


Ignore:
Timestamp:
Aug 10, 2017 5:36:24 PM (7 years ago)
Author:
Yusuke Suzuki
Message:

Unreviewed, attempt to fix build failure with VC2017

Source/WTF:

  • wtf/PriorityQueue.h:

Tools:

  • TestWebKitAPI/Tests/WTF/PriorityQueue.cpp:

(TEST):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r220562 r220567  
     12017-08-10  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        Unreviewed, attempt to fix build failure with VC2017
     4
     5        * wtf/PriorityQueue.h:
     6
    172017-08-10  Yusuke Suzuki  <utatane.tea@gmail.com>
    28
  • trunk/Source/WTF/wtf/PriorityQueue.h

    r215139 r220567  
    3838// 3) It has in-place decrease/increaseKey methods, although they are still O(n) rather than O(log(n)).
    3939
    40 template<typename T, bool (*isHigherPriority)(const T&, const T&) = isLessThan<T>, size_t inlineCapacity = 0>
     40template<typename T, bool (*isHigherPriority)(const T&, const T&) = &isLessThan<T>, size_t inlineCapacity = 0>
    4141class PriorityQueue {
    4242    using BufferType = Vector<T, inlineCapacity>;
  • trunk/Tools/ChangeLog

    r220565 r220567  
     12017-08-10  Yusuke Suzuki  <utatane.tea@gmail.com>
     2
     3        Unreviewed, attempt to fix build failure with VC2017
     4
     5        * TestWebKitAPI/Tests/WTF/PriorityQueue.cpp:
     6        (TEST):
     7
    182017-08-10  Yusuke Suzuki  <utatane.tea@gmail.com>
    29
  • trunk/Tools/TestWebKitAPI/Tests/WTF/PriorityQueue.cpp

    r220562 r220567  
    7777{
    7878    const unsigned numElements = 10;
    79     PriorityQueue<unsigned, isGreaterThan<unsigned>> queue;
     79    PriorityQueue<unsigned, &isGreaterThan<unsigned>> queue;
    8080
    8181    EXPECT_EQ(0_z, queue.size());
     
    107107TEST(WTF_PriorityQueue, MoveOnly)
    108108{
    109     PriorityQueue<MoveOnly, CompareMove<isLessThan<unsigned>>::compare> queue;
     109    PriorityQueue<MoveOnly, &CompareMove<&isLessThan<unsigned>>::compare> queue;
    110110
    111111    Vector<unsigned> values = { 23, 54, 4, 8, 1, 2, 4, 0 };
     
    124124TEST(WTF_PriorityQueue, DecreaseKey)
    125125{
    126     PriorityQueue<MoveOnly, CompareMove<isLessThan<unsigned>>::compare> queue;
     126    PriorityQueue<MoveOnly, &CompareMove<&isLessThan<unsigned>>::compare> queue;
    127127
    128128    Vector<unsigned> values = { 23, 54, 4, 8, 1, 2, 4, 0 };
     
    150150TEST(WTF_PriorityQueue, IncreaseKey)
    151151{
    152     PriorityQueue<MoveOnly, CompareMove<isGreaterThan<unsigned>>::compare> queue;
     152    PriorityQueue<MoveOnly, &CompareMove<&isGreaterThan<unsigned>>::compare> queue;
    153153
    154154    Vector<unsigned> values = { 23, 54, 4, 8, 1, 2, 4, 0 };
     
    176176TEST(WTF_PriorityQueue, Iteration)
    177177{
    178     PriorityQueue<MoveOnly, CompareMove<isGreaterThan<unsigned>>::compare> queue;
     178    PriorityQueue<MoveOnly, &CompareMove<&isGreaterThan<unsigned>>::compare> queue;
    179179
    180180    Vector<unsigned> values = { 23, 54, 4, 8, 1, 2, 4, 0 };
Note: See TracChangeset for help on using the changeset viewer.