From c959ce461234be679b438b86cc854c0d8f1889db Mon Sep 17 00:00:00 2001 From: John Scipione Date: Sun, 12 May 2013 16:50:26 -0400 Subject: [PATCH] Some small style fixes --- src/preferences/keymap/KeyboardLayoutView.cpp | 13 ++++++++----- src/preferences/keymap/KeymapWindow.cpp | 3 ++- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/preferences/keymap/KeyboardLayoutView.cpp b/src/preferences/keymap/KeyboardLayoutView.cpp index 50bb9ace54..cf5d8a2633 100644 --- a/src/preferences/keymap/KeyboardLayoutView.cpp +++ b/src/preferences/keymap/KeyboardLayoutView.cpp @@ -345,8 +345,9 @@ KeyboardLayoutView::MouseMoved(BPoint point, uint32 transit, int32 buttons; if (Window()->CurrentMessage() == NULL || Window()->CurrentMessage()->FindInt32("buttons", &buttons) != B_OK - || buttons == 0) + || buttons == 0) { return; + } if (fDragKey == NULL && (fabs(point.x - fClickPoint.x) > 4 || fabs(point.y - fClickPoint.y) > 4)) { @@ -505,8 +506,9 @@ KeyboardLayoutView::MessageReceived(BMessage* message) // switch keys if the dropped object came from us Key* key = _KeyForCode(keyCode); if (key == NULL - || (key == fDropTarget && fDragModifiers == fModifiers)) + || (key == fDropTarget && fDragModifiers == fModifiers)) { return; + } char* string; int32 numBytes; @@ -1098,10 +1100,11 @@ KeyboardLayoutView::_KeyChanged(const BMessage* message) const uint8* state; ssize_t size; int32 key; - if (message->FindData("states", B_UINT8_TYPE, (const void**)&state, &size) - != B_OK - || message->FindInt32("key", &key) != B_OK) + if (message->FindInt32("key", &key) != B_OK + || message->FindData("states", B_UINT8_TYPE, + (const void**)&state, &size) != B_OK) { return; + } // Update key state, and invalidate change keys diff --git a/src/preferences/keymap/KeymapWindow.cpp b/src/preferences/keymap/KeymapWindow.cpp index a1040ac7be..93f636587b 100644 --- a/src/preferences/keymap/KeymapWindow.cpp +++ b/src/preferences/keymap/KeymapWindow.cpp @@ -947,7 +947,8 @@ KeymapWindow::_GetCurrentKeymap(entry_ref& ref) BString KeymapWindow::_GetActiveKeymapName() { - BString mapName = kCurrentKeymapName; // safe default + BString mapName = kCurrentKeymapName; + // safe default entry_ref ref; _GetCurrentKeymap(ref);