From 4439e5d0ba3ffde3841ec44405a9bcaf800be279 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 18 Apr 2019 17:17:32 +0200 Subject: Cleanup: add trailing commas to avoid right shift --- intern/ghost/intern/GHOST_NDOFManager.cpp | 58 ++++++++++++---------- intern/ghost/intern/GHOST_SystemX11.cpp | 18 ++++--- intern/ghost/intern/GHOST_WindowSDL.cpp | 38 +++++++------- .../internal/opensubdiv_device_context_opencl.cc | 32 ++++++------ 4 files changed, 79 insertions(+), 67 deletions(-) (limited to 'intern') diff --git a/intern/ghost/intern/GHOST_NDOFManager.cpp b/intern/ghost/intern/GHOST_NDOFManager.cpp index b407d120a99..9999bfd7ea6 100644 --- a/intern/ghost/intern/GHOST_NDOFManager.cpp +++ b/intern/ghost/intern/GHOST_NDOFManager.cpp @@ -96,21 +96,23 @@ static const NDOF_ButtonT Modern3Dx_HID_map[] = { NDOF_BUTTON_SHIFT, NDOF_BUTTON_CTRL, NDOF_BUTTON_ROTATE, NDOF_BUTTON_PANZOOM, NDOF_BUTTON_DOMINANT, NDOF_BUTTON_PLUS, NDOF_BUTTON_MINUS}; -static const NDOF_ButtonT SpaceExplorer_HID_map[] = {NDOF_BUTTON_1, - NDOF_BUTTON_2, - NDOF_BUTTON_TOP, - NDOF_BUTTON_LEFT, - NDOF_BUTTON_RIGHT, - NDOF_BUTTON_FRONT, - NDOF_BUTTON_ESC, - NDOF_BUTTON_ALT, - NDOF_BUTTON_SHIFT, - NDOF_BUTTON_CTRL, - NDOF_BUTTON_FIT, - NDOF_BUTTON_MENU, - NDOF_BUTTON_PLUS, - NDOF_BUTTON_MINUS, - NDOF_BUTTON_ROTATE}; +static const NDOF_ButtonT SpaceExplorer_HID_map[] = { + NDOF_BUTTON_1, + NDOF_BUTTON_2, + NDOF_BUTTON_TOP, + NDOF_BUTTON_LEFT, + NDOF_BUTTON_RIGHT, + NDOF_BUTTON_FRONT, + NDOF_BUTTON_ESC, + NDOF_BUTTON_ALT, + NDOF_BUTTON_SHIFT, + NDOF_BUTTON_CTRL, + NDOF_BUTTON_FIT, + NDOF_BUTTON_MENU, + NDOF_BUTTON_PLUS, + NDOF_BUTTON_MINUS, + NDOF_BUTTON_ROTATE, +}; // this is the older SpacePilot (sans Pro) // thanks to polosson for info about this device @@ -123,18 +125,20 @@ static const NDOF_ButtonT SpacePilot_HID_map[] = { NDOF_BUTTON_NONE // the CONFIG button -- what does it do? }; -static const NDOF_ButtonT Generic_HID_map[] = {NDOF_BUTTON_1, - NDOF_BUTTON_2, - NDOF_BUTTON_3, - NDOF_BUTTON_4, - NDOF_BUTTON_5, - NDOF_BUTTON_6, - NDOF_BUTTON_7, - NDOF_BUTTON_8, - NDOF_BUTTON_9, - NDOF_BUTTON_A, - NDOF_BUTTON_B, - NDOF_BUTTON_C}; +static const NDOF_ButtonT Generic_HID_map[] = { + NDOF_BUTTON_1, + NDOF_BUTTON_2, + NDOF_BUTTON_3, + NDOF_BUTTON_4, + NDOF_BUTTON_5, + NDOF_BUTTON_6, + NDOF_BUTTON_7, + NDOF_BUTTON_8, + NDOF_BUTTON_9, + NDOF_BUTTON_A, + NDOF_BUTTON_B, + NDOF_BUTTON_C, +}; static const int genericButtonCount = sizeof(Generic_HID_map) / sizeof(NDOF_ButtonT); diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 4d467f3b913..b850619e851 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -692,14 +692,16 @@ bool GHOST_SystemX11::processEvents(bool waitForEvent) if (xev_next.type == KeyPress || xev_next.type == KeyRelease) { /* XK_Hyper_L/R currently unused */ - const static KeySym modifiers[8] = {XK_Shift_L, - XK_Shift_R, - XK_Control_L, - XK_Control_R, - XK_Alt_L, - XK_Alt_R, - XK_Super_L, - XK_Super_R}; + const static KeySym modifiers[8] = { + XK_Shift_L, + XK_Shift_R, + XK_Control_L, + XK_Control_R, + XK_Alt_L, + XK_Alt_R, + XK_Super_L, + XK_Super_R, + }; for (int i = 0; i < (sizeof(modifiers) / sizeof(*modifiers)); i++) { KeyCode kc = XKeysymToKeycode(m_display, modifiers[i]); diff --git a/intern/ghost/intern/GHOST_WindowSDL.cpp b/intern/ghost/intern/GHOST_WindowSDL.cpp index d40377acc3a..89efdf1a94e 100644 --- a/intern/ghost/intern/GHOST_WindowSDL.cpp +++ b/intern/ghost/intern/GHOST_WindowSDL.cpp @@ -349,24 +349,26 @@ static unsigned char sdl_std_cursor_mask_sb_h_double_arrow[] = { 0x18, 0x0c, }; -static unsigned char sdl_std_cursor_sb_h_double_arrow[] = {0x00, - 0x00, - 0x08, - 0x08, - 0x0c, - 0x18, - 0xfe, - 0x3f, - 0x0f, - 0x78, - 0xfe, - 0x3f, - 0x0c, - 0x18, - 0x08, - 0x08, - 0x00, - 0x00}; +static unsigned char sdl_std_cursor_sb_h_double_arrow[] = { + 0x00, + 0x00, + 0x08, + 0x08, + 0x0c, + 0x18, + 0xfe, + 0x3f, + 0x0f, + 0x78, + 0xfe, + 0x3f, + 0x0c, + 0x18, + 0x08, + 0x08, + 0x00, + 0x00, +}; #define sdl_std_cursor_WIDTH_sb_h_double_arrow 15 #define sdl_std_cursor_HEIGHT_sb_h_double_arrow 9 #define sdl_std_cursor_HOT_X_sb_h_double_arrow -7 diff --git a/intern/opensubdiv/internal/opensubdiv_device_context_opencl.cc b/intern/opensubdiv/internal/opensubdiv_device_context_opencl.cc index 12f6ced4bbb..72285930889 100644 --- a/intern/opensubdiv/internal/opensubdiv_device_context_opencl.cc +++ b/intern/opensubdiv/internal/opensubdiv_device_context_opencl.cc @@ -155,26 +155,30 @@ bool CLDeviceContext::Initialize() cl_platform_id cp_platform = findPlatform(); # if defined(_WIN32) - cl_context_properties props[] = {CL_GL_CONTEXT_KHR, - (cl_context_properties)wglGetCurrentContext(), - CL_WGL_HDC_KHR, - (cl_context_properties)wglGetCurrentDC(), - CL_CONTEXT_PLATFORM, - (cl_context_properties)cp_platform, - 0}; + cl_context_properties props[] = { + CL_GL_CONTEXT_KHR, + (cl_context_properties)wglGetCurrentContext(), + CL_WGL_HDC_KHR, + (cl_context_properties)wglGetCurrentDC(), + CL_CONTEXT_PLATFORM, + (cl_context_properties)cp_platform, + 0, + }; # elif defined(__APPLE__) CGLContextObj kCGLContext = CGLGetCurrentContext(); CGLShareGroupObj kCGLShareGroup = CGLGetShareGroup(kCGLContext); cl_context_properties props[] = { CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE, (cl_context_properties)kCGLShareGroup, 0}; # else - cl_context_properties props[] = {CL_GL_CONTEXT_KHR, - (cl_context_properties)glXGetCurrentContext(), - CL_GLX_DISPLAY_KHR, - (cl_context_properties)glXGetCurrentDisplay(), - CL_CONTEXT_PLATFORM, - (cl_context_properties)cp_platform, - 0}; + cl_context_properties props[] = { + CL_GL_CONTEXT_KHR, + (cl_context_properties)glXGetCurrentContext(), + CL_GLX_DISPLAY_KHR, + (cl_context_properties)glXGetCurrentDisplay(), + CL_CONTEXT_PLATFORM, + (cl_context_properties)cp_platform, + 0, + }; # endif # if defined(__APPLE__) -- cgit v1.2.3