Chromium Code Reviews| Index: third_party/WebKit/Source/platform/exported/WebCoalescedInputEvent.cpp |
| diff --git a/third_party/WebKit/Source/platform/exported/WebCoalescedInputEvent.cpp b/third_party/WebKit/Source/platform/exported/WebCoalescedInputEvent.cpp |
| index 0ae61f0ebd041bb458c94b3741d1adb4fec722c1..cf6c6d8b3cb8679c80771d5f56a25e6ba6ca8d29 100644 |
| --- a/third_party/WebKit/Source/platform/exported/WebCoalescedInputEvent.cpp |
| +++ b/third_party/WebKit/Source/platform/exported/WebCoalescedInputEvent.cpp |
| @@ -88,8 +88,9 @@ size_t WebCoalescedInputEvent::coalescedEventSize() const { |
| return m_coalescedEvents.size(); |
| } |
| -const WebInputEvent* WebCoalescedInputEvent::coalescedEvent(int index) const { |
| - return m_coalescedEvents[index].get(); |
| +const WebInputEvent& WebCoalescedInputEvent::coalescedEvent( |
| + size_t index) const { |
| + return *m_coalescedEvents[index].get(); |
| } |
| std::vector<const WebInputEvent*> |
| @@ -114,7 +115,7 @@ WebCoalescedInputEvent::WebCoalescedInputEvent(const WebInputEvent& event) |
| WebCoalescedInputEvent::WebCoalescedInputEvent( |
| const WebInputEvent& event, |
| const std::vector<const WebInputEvent*>& coalescedEvents) |
| - : m_event(), m_coalescedEvents(coalescedEvents.size()) { |
| + : m_event(), m_coalescedEvents() { |
|
kinuko
2017/01/19 13:40:18
I don't think we need these empty initializers her
Navid Zolghadr
2017/01/19 21:46:25
Done.
|
| m_event = makeWebScopedInputEvent(event); |
| for (const auto& coalescedEvent : coalescedEvents) |
| m_coalescedEvents.push_back(makeWebScopedInputEvent(*coalescedEvent)); |