diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-19 05:48:44 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-19 05:48:44 +0400 |
commit | 47c23750e8ec7107cc4e2613b91ba2b3567e8448 (patch) | |
tree | 3f3b268684ed5e29b34bb65a18ffe21431490cba | |
parent | 2060bb114a4c355b9bc9ed534709b995b86f1dce (diff) |
style cleanup: indent/whitespace
-rw-r--r-- | intern/ghost/intern/GHOST_SystemWin32.cpp | 43 | ||||
-rw-r--r-- | intern/opencolorio/ocio_impl.cc | 2 | ||||
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 24 | ||||
-rw-r--r-- | source/blender/bmesh/intern/bmesh_queries.c | 12 | ||||
-rw-r--r-- | source/blender/freestyle/intern/stroke/StrokeShader.h | 2 | ||||
-rw-r--r-- | source/gameengine/GameLogic/SCA_IScene.cpp | 2 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 2 |
7 files changed, 41 insertions, 46 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp index a0ebb2c25dc..b43758b345f 100644 --- a/intern/ghost/intern/GHOST_SystemWin32.cpp +++ b/intern/ghost/intern/GHOST_SystemWin32.cpp @@ -1110,7 +1110,7 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, event = processWindowEvent(LOWORD(wParam) ? GHOST_kEventWindowActivate : GHOST_kEventWindowDeactivate, window); /* WARNING: Let DefWindowProc handle WM_ACTIVATE, otherwise WM_MOUSEWHEEL * will not be dispatched to OUR active window if we minimize one of OUR windows. */ - if(LOWORD(wParam)==WA_INACTIVE) + if (LOWORD(wParam)==WA_INACTIVE) window->lostMouseCapture(); lResult = ::DefWindowProc(hwnd, msg, wParam, lParam); @@ -1136,10 +1136,9 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, * function when the application obtains a WM_PAINT message by using the GetMessage or * PeekMessage function. */ - if(!window->m_inLiveResize) - { - event = processWindowEvent(GHOST_kEventWindowUpdate, window); - ::ValidateRect(hwnd, NULL); + if (!window->m_inLiveResize) { + event = processWindowEvent(GHOST_kEventWindowUpdate, window); + ::ValidateRect(hwnd, NULL); } else { eventHandled = true; @@ -1163,15 +1162,13 @@ 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) - { - system->pushEvent(processWindowEvent(GHOST_kEventWindowSize, window)); - system->dispatchEvents(); - } - else - { - event = processWindowEvent(GHOST_kEventWindowSize, window); - } + if(window->m_inLiveResize) { + system->pushEvent(processWindowEvent(GHOST_kEventWindowSize, window)); + system->dispatchEvents(); + } + else { + event = processWindowEvent(GHOST_kEventWindowSize, window); + } break; case WM_CAPTURECHANGED: window->lostMouseCapture(); @@ -1187,16 +1184,14 @@ LRESULT WINAPI GHOST_SystemWin32::s_wndProc(HWND hwnd, UINT msg, WPARAM wParam, * to perform any move or size change processing during the WM_WINDOWPOSCHANGED * message without calling DefWindowProc. */ - /* see WM_SIZE comment*/ - if(window->m_inLiveResize) - { - system->pushEvent(processWindowEvent(GHOST_kEventWindowMove, window)); - system->dispatchEvents(); - } - else - { - event = processWindowEvent(GHOST_kEventWindowMove, window); - } + /* see WM_SIZE comment*/ + if (window->m_inLiveResize) { + system->pushEvent(processWindowEvent(GHOST_kEventWindowMove, window)); + system->dispatchEvents(); + } + else { + event = processWindowEvent(GHOST_kEventWindowMove, window); + } break; //////////////////////////////////////////////////////////////////////// diff --git a/intern/opencolorio/ocio_impl.cc b/intern/opencolorio/ocio_impl.cc index 05c29fd5854..9f490ea05ac 100644 --- a/intern/opencolorio/ocio_impl.cc +++ b/intern/opencolorio/ocio_impl.cc @@ -56,7 +56,7 @@ using namespace OCIO_NAMESPACE; #endif #define MEM_NEW(type) new(MEM_mallocN(sizeof(type), __func__)) type() -#define MEM_DELETE(what, type) if(what) { ((type*)(what))->~type(); MEM_freeN(what); } (void)0 +#define MEM_DELETE(what, type) if (what) { ((type*)(what))->~type(); MEM_freeN(what); } (void)0 static const int LUT3D_EDGE_SIZE = 32; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 37cebc3063d..16dd4c9ebd8 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -5443,10 +5443,10 @@ static void direct_link_scene(FileData *fd, Scene *sce) link_list(fd, &(sce->transform_spaces)); link_list(fd, &(sce->r.layers)); - for(srl = sce->r.layers.first; srl; srl = srl->next) { + for (srl = sce->r.layers.first; srl; srl = srl->next) { link_list(fd, &(srl->freestyleConfig.modules)); } - for(srl = sce->r.layers.first; srl; srl = srl->next) { + for (srl = sce->r.layers.first; srl; srl = srl->next) { link_list(fd, &(srl->freestyleConfig.linesets)); } @@ -7033,16 +7033,16 @@ static void direct_link_linestyle(FileData *fd, FreestyleLineStyle *linestyle) linestyle->adt= newdataadr(fd, linestyle->adt); direct_link_animdata(fd, linestyle->adt); link_list(fd, &linestyle->color_modifiers); - for(modifier = linestyle->color_modifiers.first; modifier; modifier = modifier->next) + for (modifier = linestyle->color_modifiers.first; modifier; modifier = modifier->next) direct_link_linestyle_color_modifier(fd, modifier); link_list(fd, &linestyle->alpha_modifiers); - for(modifier = linestyle->alpha_modifiers.first; modifier; modifier = modifier->next) + for (modifier = linestyle->alpha_modifiers.first; modifier; modifier = modifier->next) direct_link_linestyle_alpha_modifier(fd, modifier); link_list(fd, &linestyle->thickness_modifiers); - for(modifier = linestyle->thickness_modifiers.first; modifier; modifier = modifier->next) + for (modifier = linestyle->thickness_modifiers.first; modifier; modifier = modifier->next) direct_link_linestyle_thickness_modifier(fd, modifier); link_list(fd, &linestyle->geometry_modifiers); - for(modifier = linestyle->geometry_modifiers.first; modifier; modifier = modifier->next) + for (modifier = linestyle->geometry_modifiers.first; modifier; modifier = modifier->next) direct_link_linestyle_geometry_modifier(fd, modifier); } @@ -9455,12 +9455,12 @@ static void do_versions(FileData *fd, Library *lib, Main *main) SceneRenderLayer *srl; FreestyleLineStyle *linestyle; - for(sce = main->scene.first; sce; sce = sce->id.next) { + for (sce = main->scene.first; sce; sce = sce->id.next) { if (sce->r.line_thickness_mode == 0) { sce->r.line_thickness_mode = R_LINE_THICKNESS_ABSOLUTE; sce->r.unit_line_thickness = 1.0f; } - for(srl = sce->r.layers.first; srl; srl = srl->next) { + for (srl = sce->r.layers.first; srl; srl = srl->next) { if (srl->freestyleConfig.mode == 0) srl->freestyleConfig.mode = FREESTYLE_CONTROL_EDITOR_MODE; if (srl->freestyleConfig.raycasting_algorithm == FREESTYLE_ALGO_CULLED_ADAPTIVE_CUMULATIVE || @@ -9490,7 +9490,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) } } - for(linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) { + for (linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) { #if 1 /* disable the Misc panel for now */ if (linestyle->panel == LS_PANEL_MISC) { @@ -9578,11 +9578,11 @@ static void do_versions(FileData *fd, Library *lib, Main *main) for (brush = main->brush.first; brush; brush = brush->id.next) { brush->flag &= ~BRUSH_FIXED; - if(brush->cursor_overlay_alpha < 2) + if (brush->cursor_overlay_alpha < 2) brush->cursor_overlay_alpha = 33; - if(brush->texture_overlay_alpha < 2) + if (brush->texture_overlay_alpha < 2) brush->texture_overlay_alpha = 33; - if(brush->mask_overlay_alpha <2) + if (brush->mask_overlay_alpha <2) brush->mask_overlay_alpha = 33; } #undef BRUSH_FIXED diff --git a/source/blender/bmesh/intern/bmesh_queries.c b/source/blender/bmesh/intern/bmesh_queries.c index 20769872012..930ae7da4c7 100644 --- a/source/blender/bmesh/intern/bmesh_queries.c +++ b/source/blender/bmesh/intern/bmesh_queries.c @@ -1714,14 +1714,14 @@ bool BM_face_exists_overlap(BMVert **varr, const int len, BMFace **r_f_overlap) #ifdef DEBUG /* check flag isn't already set */ - for(i = 0; i < len; i++) { + for (i = 0; i < len; i++) { BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) { BLI_assert(BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0); } } #endif - for(i = 0; i < len; i++) { + for (i = 0; i < len; i++) { BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) { if (BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0) { if (len <= BM_verts_in_face_count(f, varr, len)) { @@ -1764,7 +1764,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len) #ifdef DEBUG /* check flag isn't already set */ - for(i = 0; i < len; i++) { + for (i = 0; i < len; i++) { BLI_assert(BM_ELEM_API_FLAG_TEST(varr[i], _FLAG_OVERLAP) == 0); BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) { BLI_assert(BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0); @@ -1772,7 +1772,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len) } #endif - for(i = 0; i < len; i++) { + for (i = 0; i < len; i++) { BM_ITER_ELEM (f, &viter, varr[i], BM_FACES_OF_VERT) { if ((f->len <= len) && (BM_ELEM_API_FLAG_TEST(f, _FLAG_OVERLAP) == 0)) { /* check if all vers in this face are flagged*/ @@ -1780,7 +1780,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len) if (is_init == false) { is_init = true; - for(i = 0; i < len; i++) { + for (i = 0; i < len; i++) { BM_ELEM_API_FLAG_ENABLE(varr[i], _FLAG_OVERLAP); } } @@ -1805,7 +1805,7 @@ bool BM_face_exists_overlap_subset(BMVert **varr, const int len) } if (is_init == true) { - for(i = 0; i < len; i++) { + for (i = 0; i < len; i++) { BM_ELEM_API_FLAG_DISABLE(varr[i], _FLAG_OVERLAP); } } diff --git a/source/blender/freestyle/intern/stroke/StrokeShader.h b/source/blender/freestyle/intern/stroke/StrokeShader.h index 7986a08e303..4657e98be61 100644 --- a/source/blender/freestyle/intern/stroke/StrokeShader.h +++ b/source/blender/freestyle/intern/stroke/StrokeShader.h @@ -63,7 +63,7 @@ class Stroke; * \endcode * Here is a C++ code example of such an iteration: * \code - * for(StrokeInternal::StrokeVertexIterator v = ioStroke.strokeVerticesBegin(), vend = ioStroke.strokeVerticesEnd(); + * for (StrokeInternal::StrokeVertexIterator v = ioStroke.strokeVerticesBegin(), vend = ioStroke.strokeVerticesEnd(); * v != vend; * ++v) * { diff --git a/source/gameengine/GameLogic/SCA_IScene.cpp b/source/gameengine/GameLogic/SCA_IScene.cpp index 60b4d19e155..c98c86639d3 100644 --- a/source/gameengine/GameLogic/SCA_IScene.cpp +++ b/source/gameengine/GameLogic/SCA_IScene.cpp @@ -87,7 +87,7 @@ void SCA_IScene::AddDebugProperty(class CValue* debugprop, void SCA_IScene::RemoveObjectDebugProperties(class CValue* gameobj) { vector<SCA_DebugProp*>::iterator it = m_debugList.begin(); - while(it != m_debugList.end()) { + while (it != m_debugList.end()) { CValue* debugobj = (*it)->m_obj; if (debugobj == gameobj) { diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 0b90e0227c8..4fa51b48ab8 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -445,7 +445,7 @@ void KX_Scene::AddObjectDebugProperties(class KX_GameObject* gameobj) Object* blenderobject = gameobj->GetBlenderObject(); bProperty* prop = (bProperty*)blenderobject->prop.first; - while(prop) { + while (prop) { if (prop->flag & PROP_DEBUG) AddDebugProperty(gameobj,STR_String(prop->name)); prop = prop->next; |