cleanup: spacing & alignment

This commit is contained in:
Mike Erwin 2016-09-27 14:56:58 +02:00
parent 54ed22c843
commit 2ebb367b0f

@ -91,7 +91,6 @@ static GHOST_TButtonMask convertButton(int button)
*/
static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction)
{
//printf("\nrecvchar %c 0x%x",recvChar,recvChar);
switch (rawCode) {
/*Physical keycodes not used due to map changes in int'l keyboards
@ -235,7 +234,6 @@ static GHOST_TKey convertKey(int rawCode, unichar recvChar, UInt16 keyAction)
UCKeyTranslate((UCKeyboardLayout*)CFDataGetBytePtr(uchrHandle), rawCode, keyAction, 0,
LMGetKbdType(), kUCKeyTranslateNoDeadKeysBit, &deadKeyState, 1, &actualStrLength, &recvChar);
}
switch (recvChar) {
@ -701,7 +699,6 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent)
anyProcessed = true;
}
#endif
do {
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
event = [NSApp nextEventMatchingMask:NSAnyEventMask
@ -1102,7 +1099,6 @@ GHOST_TUns8 GHOST_SystemCocoa::handleQuitRequest()
handleApplicationBecomeActiveEvent();
}
}
}
else {
pushEvent( new GHOST_Event(getMilliSeconds(), GHOST_kEventQuit, NULL) );
@ -1241,7 +1237,6 @@ bool GHOST_SystemCocoa::handleTabletEvent(void *eventPtr)
//No tablet event included : do nothing
return false;
}
}
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070
@ -1371,7 +1366,6 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
y_accum += -[event deltaY]-m_cursorDelta_y; //Strange Apple implementation (inverted coordinates for the deltaY) ...
window->setCursorGrabAccum(x_accum, y_accum);
//Warp mouse cursor if needed
x_mouse += [event deltaX]-m_cursorDelta_x;
y_mouse += -[event deltaY]-m_cursorDelta_y;
@ -1467,7 +1461,6 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
dx = [event deltaX];
dy = [event deltaY];
}
#else
/* trying to pretend you have nice scrolls... */
dx = [event deltaX];
@ -1514,7 +1507,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
GHOST_TInt32 x, y;
window->clientToScreenIntern(mousePos.x, mousePos.y, x, y);
pushEvent(new GHOST_EventTrackpad([event timestamp] * 1000, window, GHOST_kTrackpadEventRotate, x, y,
-[event rotation] * 5.0, 0));
[event rotation] * 5.0, 0));
}
default:
return GHOST_kFailure;
@ -1649,8 +1642,7 @@ GHOST_TUns8* GHOST_SystemCocoa::getClipboard(bool selection) const
NSArray *supportedTypes =
[NSArray arrayWithObjects: NSStringPboardType, nil];
NSString *bestType = [[NSPasteboard generalPasteboard]
availableTypeFromArray:supportedTypes];
NSString *bestType = [[NSPasteboard generalPasteboard] availableTypeFromArray:supportedTypes];
if (bestType == nil) {
[pool drain];
@ -1712,4 +1704,3 @@ void GHOST_SystemCocoa::putClipboard(GHOST_TInt8 *buffer, bool selection) const
[pool drain];
}