Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1292)

Unified Diff: Source/core/page/DragController.cpp

Issue 141273002: Code problems detected by cppcheck (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/rendering/InlineTextBox.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/DragController.cpp
diff --git a/Source/core/page/DragController.cpp b/Source/core/page/DragController.cpp
index 075b45c3f4358a4a8e48d00d5de861adf7af7303..32fd86e248e99bee0ff3ab1f54be4165467e1238 100644
--- a/Source/core/page/DragController.cpp
+++ b/Source/core/page/DragController.cpp
@@ -110,13 +110,11 @@ static bool dragTypeIsValid(DragSourceAction action)
static PlatformMouseEvent createMouseEvent(DragData* dragData)
{
- bool shiftKey, ctrlKey, altKey, metaKey;
- shiftKey = ctrlKey = altKey = metaKey = false;
int keyState = dragData->modifierKeyState();
- shiftKey = static_cast<bool>(keyState & PlatformEvent::ShiftKey);
- ctrlKey = static_cast<bool>(keyState & PlatformEvent::CtrlKey);
- altKey = static_cast<bool>(keyState & PlatformEvent::AltKey);
- metaKey = static_cast<bool>(keyState & PlatformEvent::MetaKey);
+ bool shiftKey = static_cast<bool>(keyState & PlatformEvent::ShiftKey);
+ bool ctrlKey = static_cast<bool>(keyState & PlatformEvent::CtrlKey);
+ bool altKey = static_cast<bool>(keyState & PlatformEvent::AltKey);
+ bool metaKey = static_cast<bool>(keyState & PlatformEvent::MetaKey);
return PlatformMouseEvent(dragData->clientPosition(), dragData->globalPosition(),
LeftButton, PlatformEvent::MouseMoved, 0, shiftKey, ctrlKey, altKey,
« no previous file with comments | « Source/core/loader/FrameLoader.cpp ('k') | Source/core/rendering/InlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698