Changeset 201485 in webkit


Ignore:
Timestamp:
May 28, 2016, 9:55:38 AM (9 years ago)
Author:
Konstantin Tokarev
Message:

Use COMPILER(MSVC) instead of PLATFORM(WIN) for MSVC-specific workaround
https://bugs.webkit.org/show_bug.cgi?id=158169

Reviewed by NOBODY (OOPS!).

No new tests needed.

  • platform/PlatformMouseEvent.h:
  • platform/win/PlatformMouseEventWin.cpp: Moved operators'

implementations to PlatformMouseEvent.h

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/Source/WebCore/ChangeLog

    r201482 r201485  
     12016-05-28  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        Use COMPILER(MSVC) instead of PLATFORM(WIN) for MSVC-specific workaround
     4        https://bugs.webkit.org/show_bug.cgi?id=158169
     5
     6        Reviewed by Darin Adler.
     7
     8        No new tests needed.
     9
     10        * platform/PlatformMouseEvent.h:
     11        * platform/win/PlatformMouseEventWin.cpp: Moved operators'
     12        implementations to PlatformMouseEvent.h
     13
    1142016-05-27  Chris Dumez  <cdumez@apple.com>
    215
  • TabularUnified trunk/Source/WebCore/platform/PlatformMouseEvent.h

    r184345 r201485  
    139139    };
    140140
    141 #if PLATFORM(WIN)
    142     // These methods are necessary to work around the fact that MSVC will not find a most-specific
     141#if COMPILER(MSVC)
     142    // These functions are necessary to work around the fact that MSVC will not find a most-specific
    143143    // operator== to use after implicitly converting MouseButton to an unsigned short.
    144     bool operator==(unsigned short a, MouseButton b);
    145     bool operator!=(unsigned short a, MouseButton b);
     144    inline bool operator==(unsigned short a, MouseButton b)
     145    {
     146        return a == static_cast<unsigned short>(b);
     147    }
     148
     149    inline bool operator!=(unsigned short a, MouseButton b)
     150    {
     151        return a != static_cast<unsigned short>(b);
     152    }
    146153#endif
    147154
  • TabularUnified trunk/Source/WebCore/platform/win/PlatformMouseEventWin.cpp

    r187245 r201485  
    123123}
    124124
    125 bool operator==(unsigned short a, MouseButton b)
    126 {
    127     return a == static_cast<unsigned short>(b);
    128 }
    129 
    130 bool operator!=(unsigned short a, MouseButton b)
    131 {
    132     return a != static_cast<unsigned short>(b);
    133 }
    134 
    135125} // namespace WebCore
Note: See TracChangeset for help on using the changeset viewer.