Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-09-21 14:46:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-21 14:46:58 +0400
commitaa8488421f230bf4b4f6e84370085ad465a6f2b3 (patch)
treea01a53be4b194dd8f995fbd9661bed950bac8f67 /intern
parent752c1a821448f8f80d757a993af0b687021b334c (diff)
style cleanup: whitespace & odd indentation
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/intern/GHOST_DisplayManagerCocoa.mm4
-rw-r--r--intern/ghost/intern/GHOST_SystemCocoa.mm12
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp26
-rw-r--r--intern/ghost/intern/GHOST_WindowWin32.cpp14
-rw-r--r--intern/locale/boost_locale_wrapper.cpp2
5 files changed, 30 insertions, 28 deletions
diff --git a/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm b/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm
index 555f883cbf2..88f338c0649 100644
--- a/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm
+++ b/intern/ghost/intern/GHOST_DisplayManagerCocoa.mm
@@ -74,7 +74,7 @@ GHOST_TSuccess GHOST_DisplayManagerCocoa::getDisplaySetting(GHOST_TUns8 display,
else
askedDisplay = [[NSScreen screens] objectAtIndex:display];
- if(askedDisplay == nil) {
+ if (askedDisplay == nil) {
[pool drain];
return GHOST_kFailure;
}
@@ -109,7 +109,7 @@ GHOST_TSuccess GHOST_DisplayManagerCocoa::getCurrentDisplaySetting(GHOST_TUns8 d
else
askedDisplay = [[NSScreen screens] objectAtIndex:display];
- if(askedDisplay == nil) {
+ if (askedDisplay == nil) {
[pool drain];
return GHOST_kFailure;
}
diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm
index 004821a0857..37b698c8d3d 100644
--- a/intern/ghost/intern/GHOST_SystemCocoa.mm
+++ b/intern/ghost/intern/GHOST_SystemCocoa.mm
@@ -1541,8 +1541,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
window->clientToScreenIntern(x_warp+x_accum, y_warp+y_accum, x, y);
pushEvent(new GHOST_EventCursor([event timestamp] * 1000, GHOST_kEventCursorMove, window, x, y));
- }
break;
+ }
case GHOST_kGrabWrap: //Wrap cursor at area/window boundaries
{
NSPoint mousePos = [cocoawindow mouseLocationOutsideOfEventStream];
@@ -1552,7 +1552,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
GHOST_Rect bounds, windowBounds, correctedBounds;
/* fallback to window bounds */
- if(window->getCursorGrabBounds(bounds)==GHOST_kFailure)
+ if (window->getCursorGrabBounds(bounds) == GHOST_kFailure)
window->getClientBounds(bounds);
//Switch back to Cocoa coordinates orientation (y=0 at botton,the same as blender internal btw!), and to client coordinates
@@ -1586,8 +1586,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
window->getCursorGrabInitPos(x_cur, y_cur);
window->clientToScreenIntern(x_cur + x_accum, y_cur + y_accum, x, y);
pushEvent(new GHOST_EventCursor([event timestamp] * 1000, GHOST_kEventCursorMove, window, x, y));
- }
break;
+ }
default:
{
//Normal cursor operation: send mouse position in window
@@ -1599,8 +1599,8 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
m_cursorDelta_x=0;
m_cursorDelta_y=0; //Mouse motion occurred between two cursor warps, so we can reset the delta counter
- }
break;
+ }
}
}
break;
@@ -1854,7 +1854,7 @@ GHOST_TUns8* GHOST_SystemCocoa::getClipboard(bool selection) const
[pool drain];
- if(temp_buff) {
+ if (temp_buff) {
return temp_buff;
}
else {
@@ -1866,7 +1866,7 @@ void GHOST_SystemCocoa::putClipboard(GHOST_TInt8 *buffer, bool selection) const
{
NSString *textToCopy;
- if(selection) {return;} // for copying the selection, used on X11
+ if (selection) return; // for copying the selection, used on X11
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index b43758b345f..ebb419b6c04 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -599,17 +599,19 @@ GHOST_TKey GHOST_SystemWin32::convertKey(GHOST_IWindow *window, short vKey, shor
case VK_GR_LESS: key = GHOST_kKeyGrLess; break;
case VK_SHIFT:
- /* Check single shift presses */
- if (scanCode == 0x36) {
- key = GHOST_kKeyRightShift;
- } else if (scanCode == 0x2a) {
- key = GHOST_kKeyLeftShift;
- } else {
- /* Must be a combination SHIFT (Left or Right) + a Key
- * Ignore this as the next message will contain
- * the desired "Key" */
- key = GHOST_kKeyUnknown;
- }
+ /* Check single shift presses */
+ if (scanCode == 0x36) {
+ key = GHOST_kKeyRightShift;
+ }
+ else if (scanCode == 0x2a) {
+ key = GHOST_kKeyLeftShift;
+ }
+ else {
+ /* Must be a combination SHIFT (Left or Right) + a Key
+ * Ignore this as the next message will contain
+ * the desired "Key" */
+ key = GHOST_kKeyUnknown;
+ }
break;
case VK_CONTROL:
key = (extend) ? GHOST_kKeyRightControl : GHOST_kKeyLeftControl;
@@ -1162,7 +1164,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam,
* message without calling DefWindowProc.
*/
/* we get first WM_SIZE before we fully init. So, do not dispatch before we continiously resizng */
- if(window->m_inLiveResize) {
+ if (window->m_inLiveResize) {
system->pushEvent(processWindowEvent(GHOST_kEventWindowSize, window));
system->dispatchEvents();
}
diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp
index 2b311f96647..a409f5c357a 100644
--- a/intern/ghost/intern/GHOST_WindowWin32.cpp
+++ b/intern/ghost/intern/GHOST_WindowWin32.cpp
@@ -179,12 +179,12 @@ GHOST_WindowWin32::GHOST_WindowWin32(
RECT rect, desktop;
int wintype = WS_OVERLAPPEDWINDOW;
- if (m_parentWindowHwnd != 0)
- {
+ if (m_parentWindowHwnd != 0) {
wintype = WS_CHILD;
/* check against parent window if given */
GetWindowRect((HWND)m_parentWindowHwnd, &rect);
- } else {
+ }
+ else {
int framex = GetSystemMetrics(SM_CXSIZEFRAME);
int framey = GetSystemMetrics(SM_CYSIZEFRAME);
int caption = GetSystemMetrics(SM_CYCAPTION);
@@ -203,10 +203,10 @@ GHOST_WindowWin32::GHOST_WindowWin32(
desktop.bottom = GetSystemMetrics(SM_CYVIRTUALSCREEN);
/* virtual screen (desktop) bound checks */
- if(rect.left < desktop.left) rect.left = desktop.left;
- if(rect.top < desktop.top) rect.top = desktop.top;
- if(rect.bottom > desktop.bottom) rect.bottom = desktop.bottom;
- if(rect.right > desktop.right) rect.right = desktop.right;
+ if (rect.left < desktop.left) rect.left = desktop.left;
+ if (rect.top < desktop.top) rect.top = desktop.top;
+ if (rect.bottom > desktop.bottom) rect.bottom = desktop.bottom;
+ if (rect.right > desktop.right) rect.right = desktop.right;
/* dimension vars to use in window creation */
left = rect.left;
diff --git a/intern/locale/boost_locale_wrapper.cpp b/intern/locale/boost_locale_wrapper.cpp
index 5d7ba599467..945d0bbc5da 100644
--- a/intern/locale/boost_locale_wrapper.cpp
+++ b/intern/locale/boost_locale_wrapper.cpp
@@ -109,7 +109,7 @@ const char *bl_locale_pgettext(const char *msgctxt, const char *msgid)
std::locale l;
char_message_facet const &facet = std::use_facet<char_message_facet>(l);
char const *r = facet.get(0, msgctxt, msgid);
- if(r)
+ if (r)
return r;
return msgid;
}