Cleanup: brace-placement
authorCampbell Barton <ideasman42@gmail.com>
Thu, 9 Jun 2016 21:45:39 +0000 (07:45 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 9 Jun 2016 21:50:45 +0000 (07:50 +1000)
intern/ghost/intern/GHOST_ContextGLX.cpp
intern/ghost/intern/GHOST_ContextWGL.cpp
intern/ghost/intern/GHOST_DropTargetWin32.cpp
intern/ghost/intern/GHOST_EventManager.cpp
intern/ghost/intern/GHOST_NDOFManager.cpp
intern/ghost/intern/GHOST_SystemPathsWin32.cpp
intern/ghost/intern/GHOST_SystemWin32.cpp
intern/ghost/intern/GHOST_SystemX11.cpp

index 4b735bbd07c775d7e54bcfa56ceb4c1102d0f29e..d4f67da1242c5828996b6c2cf87939274fba2d77 100644 (file)
@@ -287,8 +287,7 @@ const bool GLXEW_ARB_create_context_robustness =
                attribs[i++] = 0;
 
                /* Create a GL 3.x context */
-               if (m_fbconfig)
-               {
+               if (m_fbconfig) {
                        m_context = glXCreateContextAttribsARB(m_display, m_fbconfig, s_sharedContext, true, attribs);
                }
                else {
index 75e2f94c3a36dade1c8bf105d9e4c480ea6dd16f..eeb6a2469ee6f8eaf99df9edccfd1ce746cb2b6d 100644 (file)
@@ -63,7 +63,7 @@ static bool is_crappy_intel_card()
 
 GHOST_ContextWGL::GHOST_ContextWGL(
         bool stereoVisual,
-               bool alphaBackground,
+        bool alphaBackground,
         GHOST_TUns16 numOfAASamples,
         HWND hWnd,
         HDC hDC,
@@ -79,7 +79,7 @@ GHOST_ContextWGL::GHOST_ContextWGL(
       m_contextMajorVersion(contextMajorVersion),
       m_contextMinorVersion(contextMinorVersion),
       m_contextFlags(contextFlags),
-         m_alphaBackground(alphaBackground),
+      m_alphaBackground(alphaBackground),
       m_contextResetNotificationStrategy(contextResetNotificationStrategy),
       m_hGLRC(NULL)
 #ifdef WITH_GLEW_MX
index 96ff79aa65a184531e133e51e914a8f7bd3b2e6e..cbf37bf1b165dc9df846096d9302bcd367854ebe 100644 (file)
@@ -125,8 +125,7 @@ HRESULT __stdcall GHOST_DropTargetWin32::DragEnter(IDataObject *pDataObject, DWO
  */
 HRESULT __stdcall GHOST_DropTargetWin32::DragOver(DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 {
-       if (m_window->canAcceptDragOperation())
-       {
+       if (m_window->canAcceptDragOperation()) {
                *pdwEffect = allowedDropEffect(*pdwEffect);
        }
        else {
@@ -154,8 +153,7 @@ HRESULT __stdcall GHOST_DropTargetWin32::DragLeave(void)
 HRESULT __stdcall GHOST_DropTargetWin32::Drop(IDataObject *pDataObject, DWORD grfKeyState, POINTL pt, DWORD *pdwEffect)
 {
        void *data = getGhostData(pDataObject);
-       if (m_window->canAcceptDragOperation())
-       {
+       if (m_window->canAcceptDragOperation()) {
                *pdwEffect = allowedDropEffect(*pdwEffect);
 
        }
@@ -189,15 +187,13 @@ GHOST_TDragnDropTypes GHOST_DropTargetWin32::getGhostType(IDataObject *pDataObje
         * conversion, but we do the conversion ourself with WC_NO_BEST_FIT_CHARS.
         */
        FORMATETC fmtetc = { CF_TEXT, 0, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
-       if (pDataObject->QueryGetData(&fmtetc) == S_OK)
-       {
+       if (pDataObject->QueryGetData(&fmtetc) == S_OK) {
                return GHOST_kDragnDropTypeString;
        }
 
        // Filesnames
        fmtetc.cfFormat = CF_HDROP;
-       if (pDataObject->QueryGetData(&fmtetc) == S_OK)
-       {
+       if (pDataObject->QueryGetData(&fmtetc) == S_OK) {
                return GHOST_kDragnDropTypeFilenames;
        }
 
index bc531bd515b614cb0491796468c328ed6184f826..0675ac734ed1a744f1d4fe2f90faad04dd88e6a4 100644 (file)
@@ -167,11 +167,9 @@ void GHOST_EventManager::removeWindowEvents(GHOST_IWindow *window)
 {
        TEventStack::iterator iter;
        iter = m_events.begin();
-       while (iter != m_events.end())
-       {
+       while (iter != m_events.end()) {
                GHOST_IEvent *event = *iter;
-               if (event->getWindow() == window)
-               {
+               if (event->getWindow() == window) {
                        GHOST_PRINT("GHOST_EventManager::removeWindowEvents(): removing event\n");
                        /*
                         * Found an event for this window, remove it.
@@ -191,11 +189,9 @@ void GHOST_EventManager::removeTypeEvents(GHOST_TEventType type, GHOST_IWindow *
 {
        TEventStack::iterator iter;
        iter = m_events.begin();
-       while (iter != m_events.end())
-       {
+       while (iter != m_events.end()) {
                GHOST_IEvent *event = *iter;
-               if ((event->getType() == type) && (!window || (event->getWindow() == window)))
-               {
+               if ((event->getType() == type) && (!window || (event->getWindow() == window))) {
                        GHOST_PRINT("GHOST_EventManager::removeTypeEvents(): removing event\n");
                        /*
                         * Found an event of this type for the window, remove it.
index f18b7911f4504662262f91b505964a6044da1bdc..c8e14ad357f4f49e6054338bafa64bc8c6267d73 100644 (file)
@@ -378,8 +378,7 @@ void GHOST_NDOFManager::updateButton(int button_number, bool press, GHOST_TUns64
 
        NDOF_ButtonT button = (button_number < m_buttonCount) ? m_hidMap[button_number] : NDOF_BUTTON_NONE;
 
-       switch (button)
-       {
+       switch (button) {
                case NDOF_BUTTON_NONE:
 #ifdef DEBUG_NDOF_BUTTONS
                        printf("discarded\n");
index 2bd380050f1544627a8be937c46d8299558c096c..7d0ce5158fe6949343659df3246e8a0ec48e5b26 100644 (file)
@@ -76,8 +76,7 @@ const GHOST_TUns8 *GHOST_SystemPathsWin32::getSystemDir(int, const char *version
 
        HRESULT hResult = SHGetFolderPathW(NULL, CSIDL_COMMON_APPDATA, NULL, SHGFP_TYPE_CURRENT, knownpath_16);
 
-       if (hResult == S_OK)
-       {
+       if (hResult == S_OK) {
                conv_utf_16_to_8(knownpath_16, knownpath, MAX_PATH * 3);
                strcat(knownpath, "\\Blender Foundation\\Blender\\");
                strcat(knownpath, versionstr);
@@ -94,8 +93,7 @@ const GHOST_TUns8 *GHOST_SystemPathsWin32::getUserDir(int, const char *versionst
 
        HRESULT hResult = SHGetFolderPathW(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, knownpath_16);
 
-       if (hResult == S_OK)
-       {
+       if (hResult == S_OK) {
                conv_utf_16_to_8(knownpath_16, knownpath, MAX_PATH * 3);
                strcat(knownpath, "\\Blender Foundation\\Blender\\");
                strcat(knownpath, versionstr);
index ed08ce02f475f2776a22fc1673712fd965dac84e..1ce8002520fadfbd650a7d81de378eae1e60bae4 100644 (file)
@@ -1545,8 +1545,7 @@ static bool isStartedFromCommandPrompt()
 
 int GHOST_SystemWin32::toggleConsole(int action)
 {
-       switch (action)
-       {
+       switch (action) {
                case 3: // startup: hide if not started from command prompt
                {
                        if (isStartedFromCommandPrompt()) {
index 25daa8ce2a7c48eccd2e4bf227aa8c645b339cd0..aeda95d5d4d16ac96bc10f187f3682a016e415af 100644 (file)
@@ -420,8 +420,7 @@ static Bool init_timestamp_scanner(Display *, XEvent *event, XPointer arg)
 {
        init_timestamp_data *data =
            reinterpret_cast<init_timestamp_data *>(arg);
-       switch (event->type)
-       {
+       switch (event->type) {
                case ButtonPress:
                case ButtonRelease:
                        data->timestamp = event->xbutton.time;
@@ -1964,8 +1963,7 @@ int GHOST_X11_ApplicationIOErrorHandler(Display * /*display*/)
 static bool match_token(const char *haystack, const char *needle)
 {
        const char *p, *q;
-       for (p = haystack; *p; )
-       {
+       for (p = haystack; *p; ) {
                while (*p && isspace(*p))
                        p++;
                if (!*p)