Commit c8d8e777 authored by George Burgess IV's avatar George Burgess IV Committed by Commit Bot

blink/events: replace an enum constant with an int

We get warnings if floating-point values are multiplied by enums. The
warnings go away if we use a `constexpr int` here instead, which should
be equivalent given `kTickMultiplier`'s current uses.

Bug: 1058218
Change-Id: I5fef7bfc74a9572020e71b62c667d21123135b6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096096Reviewed-by: default avatarNate Chapin <japhet@chromium.org>
Commit-Queue: George Burgess <gbiv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748908}
parent 29678a8b
...@@ -40,7 +40,7 @@ class CORE_EXPORT WheelEvent final : public MouseEvent { ...@@ -40,7 +40,7 @@ class CORE_EXPORT WheelEvent final : public MouseEvent {
DEFINE_WRAPPERTYPEINFO(); DEFINE_WRAPPERTYPEINFO();
public: public:
enum { kTickMultiplier = 120 }; constexpr static int kTickMultiplier = 120;
enum DeltaMode { kDomDeltaPixel = 0, kDomDeltaLine, kDomDeltaPage }; enum DeltaMode { kDomDeltaPixel = 0, kDomDeltaLine, kDomDeltaPage };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment