cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Fri, 6 Feb 2015 17:33:48 +0000 (04:33 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 6 Feb 2015 17:50:21 +0000 (04:50 +1100)
27 files changed:
source/blender/blenkernel/BKE_blender.h
source/blender/blenkernel/BKE_library.h
source/blender/blenkernel/intern/blender.c
source/blender/blenkernel/intern/group.c
source/blender/blenkernel/intern/library.c
source/blender/blenkernel/intern/shrinkwrap.c
source/blender/blenkernel/intern/text.c
source/blender/blenlib/intern/path_util.c
source/blender/blenlib/intern/polyfill2d_beautify.c
source/blender/blenlib/intern/system.c
source/blender/collada/ControllerExporter.cpp
source/blender/editors/animation/keyframes_general.c
source/blender/editors/armature/armature_select.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/screen/glutil.c
source/blender/editors/space_clip/clip_buttons.c
source/blender/editors/space_outliner/outliner_select.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/util/undo.c
source/blender/freestyle/intern/python/Iterator/BPy_AdjacencyIterator.cpp
source/blender/freestyle/intern/stroke/StrokeRep.cpp
source/blender/gpu/intern/gpu_select.c
source/blender/imbuf/intern/tiff.c
source/blender/modifiers/intern/MOD_wireframe.c
source/blender/windowmanager/intern/wm_operators.c
source/gameengine/GameLogic/SCA_IScene.cpp

index 0c10b209fb71c5403e448bb54fff27b83b9e596f..2c53a247f6d8650332ca60e6a52fa7c122ab3ee0 100644 (file)
@@ -88,7 +88,7 @@ void BKE_userdef_free(void);
 void BKE_userdef_state(void);
        
 /* set this callback when a UI is running */
-void set_blender_test_break_cb(void (*func)(void) );
+void set_blender_test_break_cb(void (*func)(void));
 int blender_test_break(void);
 
 #define BKE_UNDO_STR_MAX 64
index 500c2813a75411667f7da5444b96dcf72087cb72..e88a4e88209711bf30a2c16e0cd5aff14e7fedae 100644 (file)
@@ -107,8 +107,8 @@ void BKE_library_make_local(struct Main *bmain, struct Library *lib, bool untagg
 struct ID *BKE_libblock_find_name_ex(struct Main *bmain, const short type, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
 struct ID *BKE_libblock_find_name(const short type, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL();
 
-void set_free_windowmanager_cb(void (*func)(struct bContext *, struct wmWindowManager *) );
-void set_free_notifier_reference_cb(void (*func)(const void *) );
+void set_free_windowmanager_cb(void (*func)(struct bContext *, struct wmWindowManager *));
+void set_free_notifier_reference_cb(void (*func)(const void *));
 
 /* use when "" is given to new_id() */
 #define ID_FALLBACK_NAME N_("Untitled")
index 78b937c849cf4a2ba390f2e5ac6bf44fdbc5d0d2..fb02af1be2081ab61f44d0d6078c34a1adf52b6d 100644 (file)
@@ -573,7 +573,7 @@ int BKE_write_file_userdef(const char *filepath, ReportList *reports)
 
 static void (*blender_test_break_cb)(void) = NULL;
 
-void set_blender_test_break_cb(void (*func)(void) )
+void set_blender_test_break_cb(void (*func)(void))
 {
        blender_test_break_cb = func;
 }
index 96eb95968f3c0b4ad4bf0fbe13b378814ce43fc2..ae3ab833a877a34fda950274612e52a48046a499 100644 (file)
@@ -219,8 +219,8 @@ static int group_object_unlink_internal(Group *group, Object *ob)
        return removed;
 }
 
-static bool group_object_cyclic_check_internal(Object *object, Group *group) {
-
+static bool group_object_cyclic_check_internal(Object *object, Group *group)
+{
        if (object->dup_group) {
                Group *dup_group = object->dup_group;
                if ((dup_group->id.flag & LIB_DOIT) == 0) {
index 4cb792da1792c3d2da9863cc8a6b47341db3985e..a5691d6fef3a91e55d8880cedfa04c367fe0fea4 100644 (file)
@@ -1571,7 +1571,7 @@ void test_idbutton(char *name)
        ID *idtest;
        
 
-       lb = which_libbase(G.main, GS(name) );
+       lb = which_libbase(G.main, GS(name));
        if (lb == NULL) return;
        
        /* search for id */
@@ -1590,7 +1590,7 @@ void rename_id(ID *id, const char *name)
        ListBase *lb;
 
        BLI_strncpy(id->name + 2, name, sizeof(id->name) - 2);
-       lb = which_libbase(G.main, GS(id->name) );
+       lb = which_libbase(G.main, GS(id->name));
        
        new_id(lb, id, name);
 }
index d91818615f3be87c168f95aa246d29415ba3537a..2ff81cd539410091d90c02d12ef8af0d4ad2fc0c 100644 (file)
@@ -89,7 +89,7 @@ static void shrinkwrap_calc_nearest_vertex(ShrinkwrapCalcData *calc)
        nearest.index = -1;
        nearest.dist_sq = FLT_MAX;
 #ifndef __APPLE__
-#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(treeData, calc) schedule(static) if(calc->numVerts > BKE_MESH_OMP_LIMIT)
+#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(treeData, calc) schedule(static) if (calc->numVerts > BKE_MESH_OMP_LIMIT)
 #endif
        for (i = 0; i < calc->numVerts; ++i) {
                float *co = calc->vertexCos[i];
@@ -394,7 +394,7 @@ static void shrinkwrap_calc_nearest_surface_point(ShrinkwrapCalcData *calc)
 
        /* Find the nearest vertex */
 #ifndef __APPLE__
-#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(calc, treeData) schedule(static) if(calc->numVerts > BKE_MESH_OMP_LIMIT)
+#pragma omp parallel for default(none) private(i) firstprivate(nearest) shared(calc, treeData) schedule(static) if (calc->numVerts > BKE_MESH_OMP_LIMIT)
 #endif
        for (i = 0; i < calc->numVerts; ++i) {
                float *co = calc->vertexCos[i];
index 111a4cac56a815743c90def1465f7dabe839e7dc..c5a8cbe68b288cdd3a074d2d5781da2b79a5b2cf 100644 (file)
@@ -685,7 +685,7 @@ void BKE_text_clear(Text *text) /* called directly from rna */
 {
        int oldstate;
 
-       oldstate = txt_get_undostate(  );
+       oldstate = txt_get_undostate();
        txt_set_undostate(1);
        txt_sel_all(text);
        txt_delete_sel(text);
index cc9fbc85a09bc26ad9edc4e84e955de859a0da37..fb4c31d5cdf652e25f3fd5a24e206b1f2edf6a4f 100644 (file)
@@ -346,7 +346,7 @@ void BLI_cleanup_path(const char *relabase, char *path)
        /* Note
         *   memmove(start, eind, strlen(eind) + 1);
         * is the same as
-        *   strcpy( start, eind ); 
+        *   strcpy(start, eind);
         * except strcpy should not be used because there is overlap,
         * so use memmove's slightly more obscure syntax - Campbell
         */
index 1f4b598be4ce207e88bf6205f7b8ffb932a4293a..ba71f52b530ae7a60120136dfdb2c9d64c8ed882 100644 (file)
@@ -238,7 +238,7 @@ static void polyedge_beauty_cost_update_single(
                /* recalculate edge */
                const float cost = polyedge_rotate_beauty_calc(coords, tris, e);
                /* We can get cases where both choices generate very small negative costs, which leads to infinite loop.
-                * Anyway, costs above that are not worth recomputing, maybe we could even optimze it to a smaller limit?
+                * Anyway, costs above that are not worth recomputing, maybe we could even optimize it to a smaller limit?
                 * See T43578. */
                if (cost < -FLT_EPSILON) {
                        eheap_table[i] = BLI_heap_insert(eheap, cost, e);
index 51b8efbb79fc8f33af42e5baba4644c82280c849..d83077e0e78a1fed1cce796f63ce9c87507f686c 100644 (file)
@@ -115,7 +115,7 @@ void BLI_system_backtrace(FILE *fp)
        symbolinfo->SizeOfStruct = sizeof(SYMBOL_INFO);
 
        for (i = 0; i < nframes; i++) {
-               SymFromAddr(process, ( DWORD64 )( stack[ i ] ), 0, symbolinfo);
+               SymFromAddr(process, (DWORD64)(stack[i]), 0, symbolinfo);
 
                fprintf(fp, "%u: %s - 0x%0X\n", nframes - i - 1, symbolinfo->Name, symbolinfo->Address);
        }
index 25fd9c81535dd24523db1a29b4ba6a1b8bd100d1..16c3f68bca44a0cb2388507f6eb78848ef11b1cb 100644 (file)
@@ -473,7 +473,7 @@ static float get_property(Bone *bone, const char *key, float def)
        if (bone->prop) {
                IDProperty *property = IDP_GetPropertyFromGroup(bone->prop, key);
                if (property) {
-                       switch(property->type) {
+                       switch (property->type) {
                                case IDP_INT:
                                        result = (float)(IDP_Int(property));
                                        break;
index 3784cd5621e5492b1d9a6d5dcf18ec24c02a9309..932a00d1687851c6f37a88aa5bce217b379342f1 100644 (file)
@@ -641,7 +641,7 @@ static void flip_names(tAnimCopybufItem *aci, char **name)
                        str_iter = *name = MEM_mallocN(sizeof(char) * (prefix_l + postfix_l + length + 1), "flipped_path");
                        
                        BLI_strncpy(str_iter, aci->rna_path, prefix_l + 1);
-                       str_iter += prefix_l ;
+                       str_iter += prefix_l;
                        BLI_strncpy(str_iter, bname_new, length + 1);
                        str_iter += length;
                        BLI_strncpy(str_iter, str_end, postfix_l + 1);
index c6ef76c570c1bb3755113c72878f50c4042eaf92..307e6c076f28dd7631b8a6fac929a1d8962c9422 100644 (file)
@@ -254,7 +254,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, const wmEv
 
 static int armature_select_linked_poll(bContext *C)
 {
-       return (ED_operator_view3d_active(C) && ED_operator_editarmature(C) );
+       return (ED_operator_view3d_active(C) && ED_operator_editarmature(C));
 }
 
 void ARMATURE_OT_select_linked(wmOperatorType *ot)
index 9d1b312dc2447f4fb8aa53b697d10aca4fc261ed..fb73b8ec34c1c52c1fa59b031f07a30109106517 100644 (file)
@@ -1004,7 +1004,7 @@ void uiItemEnumO_value(uiLayout *layout, const char *name, int icon, const char
        PointerRNA ptr;
        PropertyRNA *prop;
 
-       UI_OPERATOR_ERROR_RET(ot, opname, return );
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        WM_operator_properties_create_ptr(&ptr, ot);
 
@@ -1036,7 +1036,7 @@ void uiItemEnumO_string(uiLayout *layout, const char *name, int icon, const char
        int value;
        bool free;
 
-       UI_OPERATOR_ERROR_RET(ot, opname, return );
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        WM_operator_properties_create_ptr(&ptr, ot);
 
@@ -1075,7 +1075,7 @@ void uiItemBooleanO(uiLayout *layout, const char *name, int icon, const char *op
        wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
        PointerRNA ptr;
 
-       UI_OPERATOR_ERROR_RET(ot, opname, return );
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        WM_operator_properties_create_ptr(&ptr, ot);
        RNA_boolean_set(&ptr, propname, value);
@@ -1088,7 +1088,7 @@ void uiItemIntO(uiLayout *layout, const char *name, int icon, const char *opname
        wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
        PointerRNA ptr;
 
-       UI_OPERATOR_ERROR_RET(ot, opname, return );
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        WM_operator_properties_create_ptr(&ptr, ot);
        RNA_int_set(&ptr, propname, value);
@@ -1101,7 +1101,7 @@ void uiItemFloatO(uiLayout *layout, const char *name, int icon, const char *opna
        wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
        PointerRNA ptr;
 
-       UI_OPERATOR_ERROR_RET(ot, opname, return );
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        WM_operator_properties_create_ptr(&ptr, ot);
        RNA_float_set(&ptr, propname, value);
@@ -1114,7 +1114,7 @@ void uiItemStringO(uiLayout *layout, const char *name, int icon, const char *opn
        wmOperatorType *ot = WM_operatortype_find(opname, 0); /* print error next */
        PointerRNA ptr;
 
-       UI_OPERATOR_ERROR_RET(ot, opname, return );
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        WM_operator_properties_create_ptr(&ptr, ot);
        RNA_string_set(&ptr, propname, value);
@@ -1878,7 +1878,7 @@ void uiItemMenuEnumO(uiLayout *layout, bContext *C, const char *opname, const ch
        MenuItemLevel *lvl;
        uiBut *but;
 
-       UI_OPERATOR_ERROR_RET(ot, opname, return );
+       UI_OPERATOR_ERROR_RET(ot, opname, return);
 
        if (!ot->srna) {
                ui_item_disabled(layout, opname);
index e70281c502bdf3daf8d7b9fa1b74c289b3ca1feb..f885cbbb24f8315868824162230f31e8187a3e8b 100644 (file)
@@ -1646,7 +1646,7 @@ static void vgroup_blend_subset(Object *ob, const bool *vgroup_validmap, const i
        BMesh *bm = em ? em->bm : NULL;
        Mesh  *me = em ? NULL   : ob->data;
 
-       MeshElemMap *emap ;
+       MeshElemMap *emap;
        int *emap_mem;
 
        BLI_SMALLSTACK_DECLARE(dv_stack, MDeformVert *);
index 134feb59d55112a2e0ed148ee75c5ff81a98f2bd..4c1698bd1d4f1efc551362585b32b2011d083cad 100644 (file)
@@ -1136,9 +1136,9 @@ void glaDrawImBuf_glsl_ctx(const bContext *C, ImBuf *ibuf, float x, float y, int
 
 void cpack(unsigned int x)
 {
-       glColor3ub( ( (x)        & 0xFF),
-                   (((x) >>  8) & 0xFF),
-                   (((x) >> 16) & 0xFF) );
+       glColor3ub(( (x)        & 0xFF),
+                  (((x) >>  8) & 0xFF),
+                  (((x) >> 16) & 0xFF));
 }
 
 void glaDrawBorderCorners(const rcti *border, float zoomx, float zoomy)
index f8299a8d3350804046b08122d3b3009ee9233174..c32d06cf9b175535ffd8ad0dc37a3c4af8a85cfd 100644 (file)
@@ -540,7 +540,7 @@ void uiTemplateMovieclipInformation(uiLayout *layout, PointerRNA *ptr, const cha
        uiItemL(col, str, ICON_NONE);
 
        /* Display current frame number. */
-       framenr = BKE_movieclip_remap_scene_to_clip_frame(clip, user->framenr) ;
+       framenr = BKE_movieclip_remap_scene_to_clip_frame(clip, user->framenr);
        if (framenr <= clip->len)
                BLI_snprintf(str, sizeof(str), IFACE_("Frame: %d / %d"), framenr, clip->len);
        else
index a98f57fa8ffd120d7dcc5e9eacded4fe26996954..ad71ac8bf30350ec083b69a447ad8e79670762b9 100644 (file)
@@ -915,7 +915,7 @@ static bool do_outliner_item_activate(bContext *C, Scene *scene, ARegion *ar, Sp
                        if (tselem->type != TSE_SEQUENCE && tselem->type != TSE_SEQ_STRIP && tselem->type != TSE_SEQUENCE_DUP)
                                tree_element_set_active_object(C, scene, soops, te,
                                                               (extend && tselem->type == 0) ? OL_SETSEL_EXTEND : OL_SETSEL_NORMAL,
-                                                              recursive && tselem->type == 0 );
+                                                              recursive && tselem->type == 0);
                        
                        if (tselem->type == 0) { // the lib blocks
                                /* editmode? */
index 7d7e03d8ead7de8001ed3d4c6b63c9259c7e5704..8d4a82fc02c4c19f9bd46c70601b18cdd7228000 100644 (file)
@@ -1523,7 +1523,7 @@ static void sequencer_slip_update_header(Scene *scene, ScrArea *sa, SlipData *da
        char msg[HEADER_LENGTH];
 
        if (sa) {
-               if(hasNumInput(&data->num_input)) {
+               if (hasNumInput(&data->num_input)) {
                        char num_str[NUM_STR_REP_LEN];
                        outputNumInput(&data->num_input, num_str, &scene->unit);
                        BLI_snprintf(msg, HEADER_LENGTH, "Trim offset: %s", num_str);
index fac57490b4436fb8cd7f3c4ded607762fc86b12c..ab882a388ade325c7f8128a651aa4edd2dac2173 100644 (file)
@@ -580,7 +580,7 @@ static int undo_history_exec(bContext *C, wmOperator *op)
                        WM_event_add_notifier(C, NC_GEOM | ND_DATA, NULL);
                }
                else if (undosys == UNDOSYSTEM_IMAPAINT) {
-                       ED_undo_paint_step_num(C, UNDO_PAINT_IMAGE, item );
+                       ED_undo_paint_step_num(C, UNDO_PAINT_IMAGE, item);
                }
                else {
                        ED_viewport_render_kill_jobs(CTX_wm_manager(C), CTX_data_main(C), true);
index 9329bd40c7652d88fabc964fa166a07202345018..edc49eb800446733df6912b16b129edf28de0c72 100644 (file)
@@ -117,7 +117,7 @@ static PyObject *AdjacencyIterator_iternext(BPy_AdjacencyIterator *self)
                self->at_start = false;
        else {
                self->a_it->increment();
-               if (self->a_it->isEnd()){
+               if (self->a_it->isEnd()) {
                        PyErr_SetNone(PyExc_StopIteration);
                        return NULL;
                }
index f7857107006f2caa4d3b442c27a79dff92073e18..ab06e207331eaef6859dcf8ba36dcd45c9e8ad19 100644 (file)
@@ -425,7 +425,7 @@ void Strip::cleanUpSingularities (const vector<StrokeVertex*>& iStrokeVertices)
                                Vec2r avP(0.0, 0.0);
                                for (j = i - timeSinceSingu1; j <= i; j++)
                                        avP = Vec2r(avP + _vertices[2 * j]->point2d());
-                               avP = Vec2r( 1.0 / float(timeSinceSingu1 + 1) * avP);
+                               avP = Vec2r(1.0 / float(timeSinceSingu1 + 1) * avP);
                                for (j = i - timeSinceSingu1; j <= i; j++)
                                        _vertices[2 * j]->setPoint2d(avP);
                                //_vertex[2 * j] = _vertex[2 * i];
index 51721426bca0b730a61d18e5c0866a4ba11beadd..35a39b2d7a107986fb3074bebbc0bb4bdee8c36d 100644 (file)
@@ -82,7 +82,7 @@ void GPU_select_begin(unsigned int *buffer, unsigned int bufsize, rctf *input, c
        g_query_state.oldhits = oldhits;
 
        if (!g_query_state.use_gpu_select) {
-               glSelectBuffer( bufsize, (GLuint *)buffer);
+               glSelectBuffer(bufsize, (GLuint *)buffer);
                glRenderMode(GL_SELECT);
                glInitNames();
                glPushName(-1);
@@ -92,8 +92,8 @@ void GPU_select_begin(unsigned int *buffer, unsigned int bufsize, rctf *input, c
 
                g_query_state.num_of_queries = ALLOC_QUERIES;
 
-               g_query_state.queries = MEM_mallocN(g_query_state.num_of_queries * sizeof(*g_query_state.queries) , "gpu selection queries");
-               g_query_state.id = MEM_mallocN(g_query_state.num_of_queries * sizeof(*g_query_state.id) , "gpu selection ids");
+               g_query_state.queries = MEM_mallocN(g_query_state.num_of_queries * sizeof(*g_query_state.queries), "gpu selection queries");
+               g_query_state.id = MEM_mallocN(g_query_state.num_of_queries * sizeof(*g_query_state.id), "gpu selection ids");
                glGenQueriesARB(g_query_state.num_of_queries, g_query_state.queries);
 
                glPushAttrib(GL_DEPTH_BUFFER_BIT | GL_VIEWPORT_BIT);
index dca10fd7eda6130fb9246fd1ca7859f948d6b684..4d58642e9c47013777d5c911620f7d1bec06823e 100644 (file)
@@ -309,8 +309,8 @@ int imb_is_a_tiff(unsigned char *mem)
        char big_endian[IMB_TIFF_NCB] = { 0x4d, 0x4d, 0x00, 0x2a };
        char lil_endian[IMB_TIFF_NCB] = { 0x49, 0x49, 0x2a, 0x00 };
 
-       return ( (memcmp(big_endian, mem, IMB_TIFF_NCB) == 0) ||
-                (memcmp(lil_endian, mem, IMB_TIFF_NCB) == 0) );
+       return ((memcmp(big_endian, mem, IMB_TIFF_NCB) == 0) ||
+               (memcmp(lil_endian, mem, IMB_TIFF_NCB) == 0));
 }
 
 static void scanline_contig_16bit(float *rectf, const unsigned short *sbuf, int scanline_w, int spp)
index 8b611f9e6da82d2c745bf85f185267ed17a34835..aa5e6116516572e88bfb2f1f0f377a313e6c45c9 100644 (file)
@@ -74,7 +74,7 @@ static bool dependsOnNormals(ModifierData *UNUSED(md))
        return true;
 }
 
-static DerivedMesh *WireframeModifier_do( WireframeModifierData *wmd, Object *ob, DerivedMesh *dm)
+static DerivedMesh *WireframeModifier_do(WireframeModifierData *wmd, Object *ob, DerivedMesh *dm)
 {
        DerivedMesh *result;
        BMesh *bm;
index 69c70a7492d238eb28dbf9d69e1b064c364236bd..c0f8709b0f7d3d7de7a0d80373e74603d022c6fc 100644 (file)
@@ -1677,7 +1677,7 @@ int WM_operator_ui_popup(bContext *C, wmOperator *op, int width, int height)
 /**
  * For use by #WM_operator_props_popup_call, #WM_operator_props_popup only.
  *
- * \note operator menu needs undo flag enabled , for redo callback */
+ * \note operator menu needs undo flag enabled, for redo callback */
 static int wm_operator_props_popup_ex(bContext *C, wmOperator *op,
                                       const bool do_call, const bool do_redo)
 {
index 3ca4b6607b3a60b40ecd61c8d80234be63ac734e..b6ce1d86ba72c6a66c957c439df0cae2908e5818 100644 (file)
@@ -114,7 +114,7 @@ void SCA_IScene::RemoveDebugProperty(class CValue *gameobj,
                                                                  const STR_String &name)
 {
        vector<SCA_DebugProp*>::iterator it = m_debugList.begin();
-       while(it != m_debugList.end()) {
+       while (it != m_debugList.end()) {
                STR_String debugname = (*it)->m_name;
                CValue *debugobj = (*it)->m_obj;