From 9e742ffc2b4b99b076cfb66ba491a9fbfc5825c2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 18 Aug 2012 13:07:48 +0000 Subject: style cleanup: also correct some doxy comments --- source/blender/blenkernel/intern/customdata.c | 20 ++++++++++---------- source/blender/blenkernel/intern/depsgraph.c | 12 +++++++----- source/blender/blenkernel/intern/ipo.c | 3 +-- source/blender/blenkernel/intern/key.c | 2 ++ source/blender/blenkernel/intern/material.c | 4 ++-- source/blender/blenlib/intern/voronoi.c | 2 +- source/blender/bmesh/intern/bmesh_error.h | 2 +- source/blender/bmesh/intern/bmesh_operator_api.h | 2 +- source/blender/bmesh/intern/bmesh_polygon.c | 3 +-- source/blender/compositor/intern/COM_ChunkOrder.cpp | 2 +- source/blender/compositor/intern/COM_ChunkOrder.h | 2 +- .../blender/compositor/intern/COM_ExecutionGroup.cpp | 2 +- .../blender/compositor/intern/COM_ExecutionSystem.h | 4 ++-- source/blender/editors/space_image/image_edit.c | 2 +- source/blender/makesrna/intern/makesrna.c | 8 ++++---- .../nodes/composite/nodes/node_composite_trackpos.c | 2 +- 16 files changed, 37 insertions(+), 35 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 4963fe8899b..b04bd5bc47f 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -1898,7 +1898,7 @@ void CustomData_copy_data(const CustomData *source, CustomData *dest, * (this should work because layers are ordered by type) */ while (dest_i < dest->totlayer && dest->layers[dest_i].type < source->layers[src_i].type) { - ++dest_i; + dest_i++; } /* if there are no more dest layers, we're done */ @@ -1936,7 +1936,7 @@ void CustomData_copy_data(const CustomData *source, CustomData *dest, * we don't want to copy all source layers to the same dest, so * increment dest_i */ - ++dest_i; + dest_i++; } } } @@ -1989,7 +1989,7 @@ void CustomData_interp(const CustomData *source, CustomData *dest, * (this should work because layers are ordered by type) */ while (dest_i < dest->totlayer && dest->layers[dest_i].type < source->layers[src_i].type) { - ++dest_i; + dest_i++; } /* if there are no more dest layers, we're done */ @@ -2011,7 +2011,7 @@ void CustomData_interp(const CustomData *source, CustomData *dest, * we don't want to copy all source layers to the same dest, so * increment dest_i */ - ++dest_i; + dest_i++; } } @@ -2401,7 +2401,7 @@ void CustomData_bmesh_copy_data(const CustomData *source, CustomData *dest, * (this should work because layers are ordered by type) */ while (dest_i < dest->totlayer && dest->layers[dest_i].type < source->layers[src_i].type) { - ++dest_i; + dest_i++; } /* if there are no more dest layers, we're done */ @@ -2425,7 +2425,7 @@ void CustomData_bmesh_copy_data(const CustomData *source, CustomData *dest, * we don't want to copy all source layers to the same dest, so * increment dest_i */ - ++dest_i; + dest_i++; } } } @@ -2637,7 +2637,7 @@ void CustomData_to_bmesh_block(const CustomData *source, CustomData *dest, * (this should work because layers are ordered by type) */ while (dest_i < dest->totlayer && dest->layers[dest_i].type < source->layers[src_i].type) { - ++dest_i; + dest_i++; } /* if there are no more dest layers, we're done */ @@ -2661,7 +2661,7 @@ void CustomData_to_bmesh_block(const CustomData *source, CustomData *dest, * we don't want to copy all source layers to the same dest, so * increment dest_i */ - ++dest_i; + dest_i++; } } } @@ -2680,7 +2680,7 @@ void CustomData_from_bmesh_block(const CustomData *source, CustomData *dest, * (this should work because layers are ordered by type) */ while (dest_i < dest->totlayer && dest->layers[dest_i].type < source->layers[src_i].type) { - ++dest_i; + dest_i++; } /* if there are no more dest layers, we're done */ @@ -2704,7 +2704,7 @@ void CustomData_from_bmesh_block(const CustomData *source, CustomData *dest, * we don't want to copy all source layers to the same dest, so * increment dest_i */ - ++dest_i; + dest_i++; } } diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index b22e24e15d4..1b53f8980cb 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -570,12 +570,14 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O /* softbody collision */ if ((ob->type == OB_MESH) || (ob->type == OB_CURVE) || (ob->type == OB_LATTICE)) { - if (modifiers_isModifierEnabled(ob, eModifierType_Softbody) - || modifiers_isModifierEnabled(ob, eModifierType_Cloth) - || modifiers_isModifierEnabled(ob, eModifierType_Smoke) - || modifiers_isModifierEnabled(ob, eModifierType_DynamicPaint) - || ob->particlesystem.first) + if (ob->particlesystem.first || + modifiers_isModifierEnabled(ob, eModifierType_Softbody) || + modifiers_isModifierEnabled(ob, eModifierType_Cloth) || + modifiers_isModifierEnabled(ob, eModifierType_Smoke) || + modifiers_isModifierEnabled(ob, eModifierType_DynamicPaint)) + { dag_add_collision_field_relation(dag, scene, ob, node); /* TODO: use effectorweight->group */ + } } /* object data drivers */ diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c index 8de9640eb35..b2a9e229be9 100644 --- a/source/blender/blenkernel/intern/ipo.c +++ b/source/blender/blenkernel/intern/ipo.c @@ -1764,8 +1764,7 @@ void do_versions_ipos_to_animato(Main *main) for (act = ob->actuators.first; act; act = act->next) { /* Any actuators set to ACT_IPO at this point are actually Action Actuators that need this converted IPO to finish converting the actuator. */ - if (act->type == ACT_IPO) - { + if (act->type == ACT_IPO) { aa = (bActionActuator*)act->data; aa->act = ob->adt->action; act->type = ACT_ACTION; diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index 60be0a60dcb..17a3c595ea7 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -1449,6 +1449,8 @@ KeyBlock *add_keyblock(Key *key, const char *name) * \note sorting is a problematic side effect in some cases, * better only do this explicitly by having its own function, * + * \param key The key datablock to add to. + * \param name Optional name for the new keyblock. * \param do_force always use ctime even for relative keys. */ KeyBlock *add_keyblock_ctime(Key *key, const char *name, const short do_force) diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 21811c19d24..e5f392e4bce 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -779,7 +779,7 @@ void assign_material(Object *ob, Material *ma, short act, int assign_type) Material *mao, **matar, ***matarar; char *matbits; short *totcolp; - char bit=0; + char bit = 0; if (act > MAXMAT) return; if (act < 1) act = 1; @@ -813,7 +813,7 @@ void assign_material(Object *ob, Material *ma, short act, int assign_type) bit = ob->matbits[ob->actcol - 1]; } else { - switch(assign_type) { + switch (assign_type) { case BKE_MAT_ASSIGN_OBDATA: bit = 0; break; diff --git a/source/blender/blenlib/intern/voronoi.c b/source/blender/blenlib/intern/voronoi.c index f61df9c11f5..80a4da5cace 100644 --- a/source/blender/blenlib/intern/voronoi.c +++ b/source/blender/blenlib/intern/voronoi.c @@ -28,7 +28,7 @@ * http://blog.ivank.net/fortunes-algorithm-and-implementation.html */ -/** \file blender/blenkernel/intern/voronoi.c +/** \file blender/blenlib/intern/voronoi.c * \ingroup bli */ diff --git a/source/blender/bmesh/intern/bmesh_error.h b/source/blender/bmesh/intern/bmesh_error.h index 606e9eeb23b..c3cedcb0e13 100644 --- a/source/blender/bmesh/intern/bmesh_error.h +++ b/source/blender/bmesh/intern/bmesh_error.h @@ -23,7 +23,7 @@ #ifndef __BMESH_ERROR_H__ #define __BMESH_ERROR_H__ -/** \file blender/bmesh/bmesh_error.h +/** \file blender/bmesh/intern/bmesh_error.h * \ingroup bmesh */ diff --git a/source/blender/bmesh/intern/bmesh_operator_api.h b/source/blender/bmesh/intern/bmesh_operator_api.h index a2f14ef8388..91a48c782f0 100644 --- a/source/blender/bmesh/intern/bmesh_operator_api.h +++ b/source/blender/bmesh/intern/bmesh_operator_api.h @@ -23,7 +23,7 @@ #ifndef __BMESH_OPERATOR_API_H__ #define __BMESH_OPERATOR_API_H__ -/** \file blender/bmesh/bmesh_operator_api.h +/** \file blender/bmesh/intern/bmesh_operator_api.h * \ingroup bmesh */ diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 4bc2ae46f52..807570f0d86 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -646,8 +646,7 @@ static int bm_face_goodline(float const (*projectverts)[3], BMFace *f, int v1i, continue; } - if (isect_point_tri_v2(pv1, v1, v2, v3) || isect_point_tri_v2(pv1, v3, v2, v1)) - { + if (isect_point_tri_v2(pv1, v1, v2, v3) || isect_point_tri_v2(pv1, v3, v2, v1)) { #if 0 if (isect_point_tri_v2(pv1, v1, v2, v3)) printf("%d in (%d, %d, %d)\n", v3i, i, v1i, v2i); diff --git a/source/blender/compositor/intern/COM_ChunkOrder.cpp b/source/blender/compositor/intern/COM_ChunkOrder.cpp index 38a3350c263..1b7c435ecea 100644 --- a/source/blender/compositor/intern/COM_ChunkOrder.cpp +++ b/source/blender/compositor/intern/COM_ChunkOrder.cpp @@ -45,7 +45,7 @@ void ChunkOrder::determineDistance(ChunkOrderHotspot **hotspots, unsigned int nu this->m_distance = distance; } -bool operator<(const ChunkOrder& a, const ChunkOrder& b) +bool operator<(const ChunkOrder &a, const ChunkOrder &b) { return a.m_distance < b.m_distance; } diff --git a/source/blender/compositor/intern/COM_ChunkOrder.h b/source/blender/compositor/intern/COM_ChunkOrder.h index 190ecb9c380..108836d5299 100644 --- a/source/blender/compositor/intern/COM_ChunkOrder.h +++ b/source/blender/compositor/intern/COM_ChunkOrder.h @@ -33,7 +33,7 @@ private: public: ChunkOrder(); void determineDistance(ChunkOrderHotspot **hotspots, unsigned int numberOfHotspots); - friend bool operator<(const ChunkOrder& a, const ChunkOrder& b); + friend bool operator<(const ChunkOrder &a, const ChunkOrder &b); void setChunkNumber(unsigned int chunknumber) { this->m_number = chunknumber; } void setX(int x) { this->m_x = x; } diff --git a/source/blender/compositor/intern/COM_ExecutionGroup.cpp b/source/blender/compositor/intern/COM_ExecutionGroup.cpp index 97afb7b6bc3..5c891705089 100644 --- a/source/blender/compositor/intern/COM_ExecutionGroup.cpp +++ b/source/blender/compositor/intern/COM_ExecutionGroup.cpp @@ -218,7 +218,7 @@ void ExecutionGroup::determineNumberOfChunks() */ void ExecutionGroup::execute(ExecutionSystem *graph) { - CompositorContext& context = graph->getContext(); + CompositorContext &context = graph->getContext(); const bNodeTree *bTree = context.getbNodeTree(); if (this->m_width == 0 || this->m_height == 0) {return; } /// @note: break out... no pixels to calculate. if (bTree->test_break && bTree->test_break(bTree->tbh)) {return; } /// @note: early break out for blur and preview nodes diff --git a/source/blender/compositor/intern/COM_ExecutionSystem.h b/source/blender/compositor/intern/COM_ExecutionSystem.h index ac849bf4f6c..39e7bc80279 100644 --- a/source/blender/compositor/intern/COM_ExecutionSystem.h +++ b/source/blender/compositor/intern/COM_ExecutionSystem.h @@ -200,12 +200,12 @@ public: /** * @brief get the reference to the compositor context */ - CompositorContext& getContext() { return this->m_context; } + CompositorContext &getContext() { return this->m_context; } /** * @brief get the reference to the compositor nodes */ - vector& getNodes() { return this->m_nodes; } + vector &getNodes() { return this->m_nodes; } /** * @brief get the reference to the compositor connections diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c index 58e6a1aa94a..036e70913b6 100644 --- a/source/blender/editors/space_image/image_edit.c +++ b/source/blender/editors/space_image/image_edit.c @@ -24,7 +24,7 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/editors/space_image/image_editor.c +/** \file blender/editors/space_image/image_edit.c * \ingroup spimage */ diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c index 32ca1bca107..62a09e65191 100644 --- a/source/blender/makesrna/intern/makesrna.c +++ b/source/blender/makesrna/intern/makesrna.c @@ -2865,7 +2865,7 @@ static const char *cpp_classes = "" "\n" "class Pointer {\n" "public:\n" -" Pointer(const PointerRNA& p) : ptr(p) { }\n" +" Pointer(const PointerRNA &p) : ptr(p) { }\n" " operator const PointerRNA&() { return ptr; }\n" " bool is_a(StructRNA *type) { return RNA_struct_is_a(ptr.type, type)? true: false; }\n" " operator void*() { return ptr.data; }\n" @@ -2909,7 +2909,7 @@ static const char *cpp_classes = "" " bool operator!=(const CollectionIterator& other) " "{ return iter.valid != other.iter.valid; }\n" "\n" -" void begin(const Pointer& ptr)\n" +" void begin(const Pointer &ptr)\n" " { if (init) Tend(&iter); Tbegin(&iter, (PointerRNA*)&ptr.ptr); t = T(iter.ptr); init = true; }\n" "\n" "private:\n" @@ -2924,7 +2924,7 @@ static const char *cpp_classes = "" "template\n" "class Collection {\n" "public:\n" -" Collection(const PointerRNA& p) : ptr(p) {}\n" +" Collection(const PointerRNA &p) : ptr(p) {}\n" "\n" " void begin(CollectionIterator& iter)\n" " { iter.begin(ptr); }\n" @@ -2968,7 +2968,7 @@ static void rna_generate_header_cpp(BlenderRNA *UNUSED(brna), FILE *f) fprintf(f, "class %s : public %s {\n", srna->identifier, (srna->base) ? srna->base->identifier : "Pointer"); fprintf(f, "public:\n"); - fprintf(f, "\t%s(const PointerRNA& ptr_arg) :\n\t\t%s(ptr_arg)", srna->identifier, + fprintf(f, "\t%s(const PointerRNA &ptr_arg) :\n\t\t%s(ptr_arg)", srna->identifier, (srna->base) ? srna->base->identifier : "Pointer"); for (dp = ds->cont.properties.first; dp; dp = dp->next) if (!(dp->prop->flag & (PROP_IDPROPERTY | PROP_BUILTIN))) diff --git a/source/blender/nodes/composite/nodes/node_composite_trackpos.c b/source/blender/nodes/composite/nodes/node_composite_trackpos.c index 09eb42b4d93..a40400c85f5 100644 --- a/source/blender/nodes/composite/nodes/node_composite_trackpos.c +++ b/source/blender/nodes/composite/nodes/node_composite_trackpos.c @@ -26,7 +26,7 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/nodes/composite/nodes/node_composite_movieclip.c +/** \file blender/nodes/composite/nodes/node_composite_trackpos.c * \ingroup cmpnodes */ -- cgit v1.2.3