style cleanup
authorCampbell Barton <ideasman42@gmail.com>
Wed, 9 Jan 2013 03:30:15 +0000 (03:30 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 9 Jan 2013 03:30:15 +0000 (03:30 +0000)
18 files changed:
source/blender/blenkernel/intern/pointcache.c
source/blender/blenloader/intern/readfile.c
source/blender/bmesh/intern/bmesh_log.c
source/blender/compositor/intern/COM_Node.h
source/blender/compositor/nodes/COM_PixelateNode.cpp
source/blender/editors/interface/view2d.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/imbuf/intern/dds/ColorBlock.h
source/blender/imbuf/intern/dds/DirectDrawSurface.h
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_internal_types.h
source/blender/python/bmesh/bmesh_py_ops_call.c
source/blender/python/generic/bpy_internal_import.h
source/blender/quicktime/quicktime_export.h
source/blender/windowmanager/WM_api.h

index c94ffd3205fc8646ae94591d5f1cc42912a31938..97948683e22928fdd6bad0bcaa7b419dd8d91035 100644 (file)
@@ -272,7 +272,7 @@ static void ptcache_particle_read(int index, void *psys_v, void **data, float cf
        ParticleSystem *psys= psys_v;
        ParticleData *pa;
        BoidParticle *boid;
-       float timestep = 0.04f*psys->part->timetweak;
+       float timestep = 0.04f * psys->part->timetweak;
 
        if (index >= psys->totpart)
                return;
@@ -333,7 +333,7 @@ static void ptcache_particle_interpolate(int index, void *psys_v, void **data, f
        ParticleSystem *psys= psys_v;
        ParticleData *pa;
        ParticleKey keys[4];
-       float dfra, timestep = 0.04f*psys->part->timetweak;
+       float dfra, timestep = 0.04f * psys->part->timetweak;
 
        if (index >= psys->totpart)
                return;
index 279c8e6bc61097ab9197da1562315c3b65e60ec9..34c08a917b3002dc3249270c905182261eae5ece 100644 (file)
@@ -3340,7 +3340,7 @@ static void direct_link_texture(FileData *fd, Tex *tex)
        tex->env = newdataadr(fd, tex->env);
        if (tex->env) {
                tex->env->ima = NULL;
-               memset(tex->env->cube, 0, 6*sizeof(void *));
+               memset(tex->env->cube, 0, 6 * sizeof(void *));
                tex->env->ok= 0;
        }
        tex->pd = newdataadr(fd, tex->pd);
index b821c9875dbc939747b6592fc53937b9c8a81019..a2510129df6a82fdccc966af14af5f31c9cb5888 100644 (file)
@@ -523,14 +523,14 @@ void BM_log_mesh_elems_reorder(BMesh *bm, BMLog *log)
        i = 0;
        varr = MEM_mallocN(sizeof(int) * bm->totvert, AT);
        BM_ITER_MESH (v, &bm_iter, bm, BM_VERTS_OF_MESH) {
-               ((unsigned int*)varr)[i++] = bm_log_vert_id_get(log, v);
+               ((unsigned int *)varr)[i++] = bm_log_vert_id_get(log, v);
        }
 
        /* Put all face IDs into an array */
        i = 0;
        farr = MEM_mallocN(sizeof(int) * bm->totface, AT);
        BM_ITER_MESH (f, &bm_iter, bm, BM_FACES_OF_MESH) {
-               ((unsigned int*)farr)[i++] = bm_log_face_id_get(log, f);
+               ((unsigned int *)farr)[i++] = bm_log_face_id_get(log, f);
        }
 
        /* Create BMVert index remap array */
index c098d6da32ba1da194c1d69933272cbb042804ac..5b0381f64436c9b7e40b97008e44b9e3d065c077 100644 (file)
@@ -58,7 +58,7 @@ private:
         * @brief The group node this node belongs to.
         * @note: used to find the links in the current subtree for muting nodes
         */
-       bNodem_bNodeGroup;
+       bNode *m_bNodeGroup;
 
 public:
        Node(bNode *editorNode, bool create_sockets = true);
@@ -145,8 +145,8 @@ public:
         */
        OutputSocket *findOutputSocketBybNodeSocket(bNodeSocket *socket);
        
-       inline void setbNodeGroup(bNodegroup) {this->m_bNodeGroup = group;}
-       inline bNodegetbNodeGroup() {return this->m_bNodeGroup;}
+       inline void setbNodeGroup(bNode *group) {this->m_bNodeGroup = group;}
+       inline bNode *getbNodeGroup() {return this->m_bNodeGroup;}
 protected:
        void addPreviewOperation(ExecutionSystem *system, CompositorContext *context, InputSocket *inputSocket);
        void addPreviewOperation(ExecutionSystem *system, CompositorContext *context, OutputSocket *outputSocket);
index f1c7c616a302779d979212aaf72b6425dc9341cb..b751c9a6e9f92559455aa61e87bbb78e9da2da4f 100644 (file)
@@ -36,8 +36,8 @@ void PixelateNode::convertToOperations(ExecutionSystem *graph, CompositorContext
        OutputSocket *outputSocket = this->getOutputSocket(0);
        DataType datatype = inputSocket->getDataType();
        if (inputSocket->isConnected()) {
-               SocketConnection * connection = inputSocket->getConnection();
-               OutputSocketotherOutputSocket = connection->getFromSocket();
+               SocketConnection *connection = inputSocket->getConnection();
+               OutputSocket *otherOutputSocket = connection->getFromSocket();
                datatype = otherOutputSocket->getDataType();
        }
 
index d0d631e14a527c15d5b0a892863805a2ffca43f4..41bbed8eb1945e89b7b5d3dae08b2e378dba019a 100644 (file)
@@ -1694,7 +1694,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
                        
                        /* draw numbers in the appropriate range */
                        if (dfac > 0.0f) {
-                               float h = 0.1f*UI_UNIT_Y + (float)(hor.ymin);
+                               float h = 0.1f * UI_UNIT_Y + (float)(hor.ymin);
                                
                                for (; fac < hor.xmax - 0.5f * U.widget_unit; fac += dfac, val += grid->dx) {
                                        
index 590bcd5939e154da41d674eadcc47fb1fc971c44..5e1d954a2ea07184bce9e99cb96e476b487ef701 100644 (file)
@@ -1320,7 +1320,7 @@ static void calc_ortho_extent(KnifeTool_OpData *kcd)
 {
        BMIter iter;
        BMVert *v;
-       BMeshbm = kcd->em->bm;
+       BMesh *bm = kcd->em->bm;
        float max_xyz = 0.0f;
        int i;
 
index 78a8bd4766819f539b2919a217b2a598972d66c1..5b5e5206e9c04705063c475b33f0ee4e9ee47d5b 100644 (file)
@@ -5265,7 +5265,7 @@ static int createSlideVerts(TransInfo *t)
                if (dot_v3v3(loop_dir[l_nr], dir) < 0.0f) {
                        swap_v3_v3(sv_array->upvec, sv_array->downvec);
                        SWAP(BMVert, sv_array->vup, sv_array->vdown);
-                       SWAP(BMVert*, sv_array->up, sv_array->down);
+                       SWAP(BMVert *, sv_array->up, sv_array->down);
                }
        }
 
index 12b0341d3957292a7b74b973e1fc5a7e83cd09fa..63eea8b8d4c356823b862e54a5674e0211f51b22 100644 (file)
@@ -127,30 +127,24 @@ static short constraints_list_needinv(TransInfo *t, ListBase *list);
 
 /* ************************** Functions *************************** */
 
-static int trans_data_compare_dist(const void *A, const void *B)
+static int trans_data_compare_dist(const void *a, const void *b)
 {
-       const TransData *td_A = (const TransData*)A;
-       const TransData *td_B = (const TransData*)B;
+       const TransData *td_a = (const TransData *)a;
+       const TransData *td_b = (const TransData *)b;
 
-       if (td_A->dist < td_B->dist)
-               return -1;
-       else if (td_A->dist > td_B->dist)
-               return 1;
-       
-       return 0;
+       if      (td_a->dist < td_b->dist) return -1;
+       else if (td_a->dist > td_b->dist) return  1;
+       else                              return  0;
 }
 
-static int trans_data_compare_rdist(const void *A, const void *B)
+static int trans_data_compare_rdist(const void *a, const void *b)
 {
-       const TransData *td_A = (const TransData*)A;
-       const TransData *td_B = (const TransData*)B;
+       const TransData *td_a = (const TransData *)a;
+       const TransData *td_b = (const TransData *)b;
 
-       if (td_A->rdist < td_B->rdist)
-               return -1;
-       else if (td_A->rdist > td_B->rdist)
-               return 1;
-       
-       return 0;
+       if      (td_a->rdist < td_b->rdist) return -1;
+       else if (td_a->rdist > td_b->rdist) return  1;
+       else                                return  0;
 }
 
 void sort_trans_data_dist(TransInfo *t)
index f969e07384cf92e7bd4aaa6bda487d12e089287f..b1bb5c85e50188479725f47227cbb3e02573be69 100644 (file)
@@ -799,7 +799,7 @@ static void stitch_validate_edge_stichability(UvEdge *edge, StitchState *state,
 }
 
 
-static void stitch_propagate_uv_final_position (UvElement *element, int index, PreviewPosition *preview_position, UVVertAverage *final_position, StitchState *state, char final, Scene* scene)
+static void stitch_propagate_uv_final_position(UvElement *element, int index, PreviewPosition *preview_position, UVVertAverage *final_position, StitchState *state, char final, Scene *scene)
 {
        StitchPreviewer *preview = state->stitch_preview;
 
@@ -1392,7 +1392,7 @@ static void stitch_switch_selection_mode(StitchState *state)
 
        if (state->mode == STITCH_VERT) {
                int i;
-               state->selection_stack = MEM_mallocN(state->total_separate_edges*sizeof(*state->selection_stack),
+               state->selection_stack = MEM_mallocN(state->total_separate_edges * sizeof(*state->selection_stack),
                                                     "stitch_new_edge_selection_stack");
 
                /* check if both elements of an edge are selected */
@@ -1415,7 +1415,7 @@ static void stitch_switch_selection_mode(StitchState *state)
        }
        else {
                int i;
-               state->selection_stack = MEM_mallocN(state->total_separate_uvs*sizeof(*state->selection_stack),
+               state->selection_stack = MEM_mallocN(state->total_separate_uvs * sizeof(*state->selection_stack),
                                                     "stitch_new_vert_selection_stack");
 
                for (i = 0; i < old_selection_size; i++) {
index f0864f06e6f563412478da3c7514edfe6c23cc75..730a19d84fd85cc3447762767d80a32a4894cbd1 100644 (file)
@@ -69,7 +69,7 @@ struct ColorBlock
        
 private:
        
-       Color32 m_color[4*4];
+       Color32 m_color[4 * 4];
        
 };
 
index 72a524daba2c3739a855e9b237a57c29d2679d08..11e6d4a57084ac4fcd0b760771f70c91f79189cf 100644 (file)
@@ -172,7 +172,7 @@ public:
        void setUserVersion(int version);
        
        void mipmap(Image * img, uint f, uint m);
-       voidreadData(uint &size);
+       void *readData(uint &size);
        //      void mipmap(FloatImage * img, uint f, uint m);
        
        void printInfo() const;
index 21bd55e0137c00132b4de7446eb05516dfac0ac9..9ce3b313c379a3ef169a02df23aa5badd45761a6 100644 (file)
@@ -424,7 +424,7 @@ static void rna_ColorManagedViewSettings_view_transform_set(PointerRNA *ptr, int
        }
 }
 
-static EnumPropertyItemrna_ColorManagedViewSettings_view_transform_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
+static EnumPropertyItem *rna_ColorManagedViewSettings_view_transform_itemf(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop), int *free)
 {
        Scene *scene = CTX_data_scene(C);
        EnumPropertyItem *items = NULL;
index b16f0d69fbaf6a4bb1d2efbc19c330bf943e442c..43ec09de010e5926a947ecb510423c69980515eb 100644 (file)
@@ -66,7 +66,7 @@ typedef void (*ContextPropUpdateFunc)(struct bContext *C, struct PointerRNA *ptr
 typedef void (*ContextUpdateFunc)(struct bContext *C, struct PointerRNA *ptr);
 typedef int (*EditableFunc)(struct PointerRNA *ptr);
 typedef int (*ItemEditableFunc)(struct PointerRNA *ptr, int index);
-typedef struct IDProperty(*IDPropertiesFunc)(struct PointerRNA *ptr, int create);
+typedef struct IDProperty *(*IDPropertiesFunc)(struct PointerRNA *ptr, int create);
 typedef struct StructRNA *(*StructRefineFunc)(struct PointerRNA *ptr);
 typedef char *(*StructPathFunc)(struct PointerRNA *ptr);
 
@@ -93,7 +93,7 @@ typedef void (*PropEnumSetFunc)(struct PointerRNA *ptr, int value);
 typedef EnumPropertyItem *(*PropEnumItemFunc)(struct bContext *C, struct PointerRNA *ptr,
                                               struct PropertyRNA *prop, int *free);
 typedef PointerRNA (*PropPointerGetFunc)(struct PointerRNA *ptr);
-typedef StructRNA(*PropPointerTypeFunc)(struct PointerRNA *ptr);
+typedef StructRNA *(*PropPointerTypeFunc)(struct PointerRNA *ptr);
 typedef void (*PropPointerSetFunc)(struct PointerRNA *ptr, const PointerRNA value);
 typedef int (*PropPointerPollFunc)(struct PointerRNA *ptr, const PointerRNA value);
 typedef void (*PropCollectionBeginFunc)(struct CollectionPropertyIterator *iter, struct PointerRNA *ptr);
index ded353632876a882df6c686b618ea89d92eb3e7d..323151950727886ab104566a247139231addb865 100644 (file)
@@ -523,7 +523,7 @@ static int bpy_slot_from_py(BMesh *bm, BMOperator *bmop, BMOpSlot *slot, PyObjec
  *
  * \note Don't throw any exceptions and should always return a valid (PyObject *).
  */
-static PyObjectbpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
+static PyObject *bpy_slot_to_py(BMesh *bm, BMOpSlot *slot)
 {
        PyObject *item = NULL;
 
index 1592ec52b4ced43b316008c75598588300287f0d..56cdf677ccb253bd3eadbc849aea192121e6afba 100644 (file)
@@ -48,9 +48,9 @@ struct Text;
 
 void bpy_import_init(PyObject *builtins);
 
-PyObject*      bpy_text_import(struct Text *text);
-PyObject*      bpy_text_import_name(const char *name, int *found);
-PyObject*      bpy_text_reimport(PyObject *module, int *found);
+PyObject   *bpy_text_import(struct Text *text);
+PyObject   *bpy_text_import_name(const char *name, int *found);
+PyObject   *bpy_text_reimport(PyObject *module, int *found);
 /* void                bpy_text_clear_modules(int clear_all);*/ /* Clear user modules */ 
 
 void bpy_text_filename_get(char *fn, size_t fn_len, struct Text *text);
index d773cdc8f3a3b9d9e4c711db1491e522ff5fca88..55323c05278dc175564b5e1ba3d8191357a07477 100644 (file)
@@ -65,14 +65,14 @@ void filepath_qt(char *string, struct RenderData *rd);
 void quicktime_verify_image_type(struct RenderData *rd, struct ImageFormatData *imf); //used by RNA for defaults values init, if needed
 /*Video codec type*/
 int quicktime_get_num_videocodecs(void);
-QuicktimeCodecTypeDescquicktime_get_videocodecType_desc(int indexValue);
+QuicktimeCodecTypeDesc *quicktime_get_videocodecType_desc(int indexValue);
 int quicktime_rnatmpvalue_from_videocodectype(int codecType);
 int quicktime_videocodecType_from_rnatmpvalue(int rnatmpvalue);
 
 #ifdef USE_QTKIT
 /*Audio codec type*/
 int quicktime_get_num_audiocodecs(void);
-QuicktimeCodecTypeDescquicktime_get_audiocodecType_desc(int indexValue);
+QuicktimeCodecTypeDesc *quicktime_get_audiocodecType_desc(int indexValue);
 int quicktime_rnatmpvalue_from_audiocodectype(int codecType);
 int quicktime_audiocodecType_from_rnatmpvalue(int rnatmpvalue);
 #endif
index eee4b5a3a57e422b2c00a947025b5b7b49d15245..eb1aad75a88552bbda192d20a6d8f4dbc862c94a 100644 (file)
@@ -204,9 +204,9 @@ void                WM_operator_stack_clear(struct wmWindowManager *wm);
 
 struct wmOperatorType *WM_operatortype_find(const char *idnamem, int quiet);
 struct GHashIterator  *WM_operatortype_iter(void);
-void           WM_operatortype_append  (void (*opfunc)(struct wmOperatorType*));
-void           WM_operatortype_append_ptr      (void (*opfunc)(struct wmOperatorType*, void *), void *userdata);
-void           WM_operatortype_append_macro_ptr        (void (*opfunc)(struct wmOperatorType*, void *), void *userdata);
+void           WM_operatortype_append(void (*opfunc)(struct wmOperatorType *));
+void           WM_operatortype_append_ptr(void (*opfunc)(struct wmOperatorType *, void *), void *userdata);
+void           WM_operatortype_append_macro_ptr(void (*opfunc)(struct wmOperatorType *, void *), void *userdata);
 int                    WM_operatortype_remove(const char *idname);
 
 struct wmOperatorType *WM_operatortype_append_macro(const char *idname, const char *name, const char *description, int flag);