[Bf-committers] [Bf-blender-cvs] [3e83a0d] master: Cleanup: ws

Sergey Sharybin sergey.vfx at gmail.com
Fri Jul 17 22:40:08 CEST 2015


Hi,

Is it just me who thinks we'd rather stick to a more formal language and
verbose explanation in the commit messages?

One writes the commit message once, but then it's being read by lots of
people multiple times.

On Sat, Jul 18, 2015 at 1:06 AM, Campbell Barton <noreply at git.blender.org>
wrote:

> Commit: 3e83a0d92dfc6b28a97a7239bef72c22ae356fd8
> Author: Campbell Barton
> Date:   Sat Jul 18 05:54:31 2015 +1000
> Branches: master
> https://developer.blender.org/rB3e83a0d92dfc6b28a97a7239bef72c22ae356fd8
>
> Cleanup: ws
>
> ===================================================================
>
> M       source/blender/blenkernel/intern/DerivedMesh.c
> M       source/blender/blenkernel/intern/editderivedmesh.c
>
> ===================================================================
>
> diff --git a/source/blender/blenkernel/intern/DerivedMesh.c
> b/source/blender/blenkernel/intern/DerivedMesh.c
> index a77e076..7582eb2 100644
> --- a/source/blender/blenkernel/intern/DerivedMesh.c
> +++ b/source/blender/blenkernel/intern/DerivedMesh.c
> @@ -3490,24 +3490,21 @@ static void navmesh_drawColored(DerivedMesh *dm)
>         glEnable(GL_LIGHTING);
>  }
>
> -static void navmesh_DM_drawFacesTex(DerivedMesh *dm,
> -                                    DMSetDrawOptionsTex setDrawOptions,
> -                                    DMCompareDrawOptions
> compareDrawOptions,
> -                                    void *userData, DMDrawFlag
> UNUSED(flag))
> +static void navmesh_DM_drawFacesTex(
> +        DerivedMesh *dm,
> +        DMSetDrawOptionsTex UNUSED(setDrawOptions),
> +        DMCompareDrawOptions UNUSED(compareDrawOptions),
> +        void *UNUSED(userData), DMDrawFlag UNUSED(flag))
>  {
> -       (void) setDrawOptions;
> -       (void) compareDrawOptions;
> -       (void) userData;
> -
>         navmesh_drawColored(dm);
>  }
>
> -static void navmesh_DM_drawFacesSolid(DerivedMesh *dm,
> -                                      float (*partial_redraw_planes)[4],
> -                                      bool UNUSED(fast), DMSetMaterial
> setMaterial)
> +static void navmesh_DM_drawFacesSolid(
> +        DerivedMesh *dm,
> +        float (*partial_redraw_planes)[4],
> +        bool UNUSED(fast), DMSetMaterial UNUSED(setMaterial))
>  {
> -       (void) partial_redraw_planes;
> -       (void) setMaterial;
> +       UNUSED_VARS(partial_redraw_planes);
>
>         //drawFacesSolid_original(dm, partial_redraw_planes, fast,
> setMaterial);
>         navmesh_drawColored(dm);
> diff --git a/source/blender/blenkernel/intern/editderivedmesh.c
> b/source/blender/blenkernel/intern/editderivedmesh.c
> index b8fade6..8f251b7 100644
> --- a/source/blender/blenkernel/intern/editderivedmesh.c
> +++ b/source/blender/blenkernel/intern/editderivedmesh.c
> @@ -319,9 +319,10 @@ static void emDM_foreachMappedVert(
>                 }
>         }
>  }
> -static void emDM_foreachMappedEdge(DerivedMesh *dm,
> -                                   void (*func)(void *userData, int
> index, const float v0co[3], const float v1co[3]),
> -                                   void *userData)
> +static void emDM_foreachMappedEdge(
> +        DerivedMesh *dm,
> +        void (*func)(void *userData, int index, const float v0co[3],
> const float v1co[3]),
> +        void *userData)
>  {
>         EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
>         BMesh *bm = bmdm->em->bm;
> @@ -346,9 +347,10 @@ static void emDM_foreachMappedEdge(DerivedMesh *dm,
>         }
>  }
>
> -static void emDM_drawMappedEdges(DerivedMesh *dm,
> -                                 DMSetDrawOptions setDrawOptions,
> -                                 void *userData)
> +static void emDM_drawMappedEdges(
> +        DerivedMesh *dm,
> +        DMSetDrawOptions setDrawOptions,
> +        void *userData)
>  {
>         EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
>         BMesh *bm = bmdm->em->bm;
> @@ -380,17 +382,19 @@ static void emDM_drawMappedEdges(DerivedMesh *dm,
>                 glEnd();
>         }
>  }
> -static void emDM_drawEdges(DerivedMesh *dm,
> -                           bool UNUSED(drawLooseEdges),
> -                           bool UNUSED(drawAllEdges))
> +static void emDM_drawEdges(
> +        DerivedMesh *dm,
> +        bool UNUSED(drawLooseEdges),
> +        bool UNUSED(drawAllEdges))
>  {
>         emDM_drawMappedEdges(dm, NULL, NULL);
>  }
>
> -static void emDM_drawMappedEdgesInterp(DerivedMesh *dm,
> -                                       DMSetDrawOptions setDrawOptions,
> -                                       DMSetDrawInterpOptions
> setDrawInterpOptions,
> -                                       void *userData)
> +static void emDM_drawMappedEdgesInterp(
> +        DerivedMesh *dm,
> +        DMSetDrawOptions setDrawOptions,
> +        DMSetDrawInterpOptions setDrawInterpOptions,
> +        void *userData)
>  {
>         EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
>         BMesh *bm = bmdm->em->bm;
> @@ -532,12 +536,14 @@ static void emDM_foreachMappedFaceCenter(
>         }
>  }
>
> -static void emDM_drawMappedFaces(DerivedMesh *dm,
> -                                 DMSetDrawOptions setDrawOptions,
> -                                 DMSetMaterial setMaterial,
> -                                 DMCompareDrawOptions compareDrawOptions,
> -                                 void *userData,
> -                                 DMDrawFlag flag)
> +static void emDM_drawMappedFaces(
> +        DerivedMesh *dm,
> +        DMSetDrawOptions setDrawOptions,
> +        DMSetMaterial setMaterial,
> +        /* currently unused -- each original face is handled separately */
> +        DMCompareDrawOptions UNUSED(compareDrawOptions),
> +        void *userData,
> +        DMDrawFlag flag)
>  {
>         EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
>         BMEditMesh *em = bmdm->em;
> @@ -562,9 +568,6 @@ static void emDM_drawMappedFaces(DerivedMesh *dm,
>         GLenum poly_prev = GL_ZERO;
>         GLenum shade_prev = GL_ZERO;
>
> -       /* currently unused -- each original face is handled separately */
> -       (void)compareDrawOptions;
> -
>         /* call again below is ok */
>         if (has_vcol_preview) {
>                 BM_mesh_elem_index_ensure(bm, BM_VERT);
> @@ -818,11 +821,12 @@ static void bmdm_get_tri_colpreview(BMLoop *ls[3],
> MLoopCol *lcol[3], unsigned c
>         lcol[2] = (MLoopCol
> *)color_vert_array[BM_elem_index_get(ls[2]->v)];
>  }
>
> -static void emDM_drawFacesTex_common(DerivedMesh *dm,
> -                                     DMSetDrawOptionsTex drawParams,
> -                                     DMSetDrawOptionsMappedTex
> drawParamsMapped,
> -                                     DMCompareDrawOptions
> compareDrawOptions,
> -                                     void *userData)
> +static void emDM_drawFacesTex_common(
> +        DerivedMesh *dm,
> +        DMSetDrawOptionsTex drawParams,
> +        DMSetDrawOptionsMappedTex drawParamsMapped,
> +        DMCompareDrawOptions compareDrawOptions,
> +        void *userData)
>  {
>         EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
>         BMEditMesh *em = bmdm->em;
> @@ -1001,18 +1005,20 @@ static void emDM_drawFacesTex_common(DerivedMesh
> *dm,
>         glShadeModel(GL_FLAT);
>  }
>
> -static void emDM_drawFacesTex(DerivedMesh *dm,
> -                              DMSetDrawOptionsTex setDrawOptions,
> -                              DMCompareDrawOptions compareDrawOptions,
> -                              void *userData, DMDrawFlag UNUSED(flag))
> +static void emDM_drawFacesTex(
> +        DerivedMesh *dm,
> +        DMSetDrawOptionsTex setDrawOptions,
> +        DMCompareDrawOptions compareDrawOptions,
> +        void *userData, DMDrawFlag UNUSED(flag))
>  {
>         emDM_drawFacesTex_common(dm, setDrawOptions, NULL,
> compareDrawOptions, userData);
>  }
>
> -static void emDM_drawMappedFacesTex(DerivedMesh *dm,
> -                                    DMSetDrawOptionsMappedTex
> setDrawOptions,
> -                                    DMCompareDrawOptions
> compareDrawOptions,
> -                                    void *userData, DMDrawFlag
> UNUSED(flag))
> +static void emDM_drawMappedFacesTex(
> +        DerivedMesh *dm,
> +        DMSetDrawOptionsMappedTex setDrawOptions,
> +        DMCompareDrawOptions compareDrawOptions,
> +        void *userData, DMDrawFlag UNUSED(flag))
>  {
>         emDM_drawFacesTex_common(dm, NULL, setDrawOptions,
> compareDrawOptions, userData);
>  }
> @@ -1078,10 +1084,11 @@ static void emdm_pass_attrib_vertex_glsl(const
> DMVertexAttribs *attribs, const B
>         }
>  }
>
> -static void emDM_drawMappedFacesGLSL(DerivedMesh *dm,
> -                                     DMSetMaterial setMaterial,
> -                                     DMSetDrawOptions setDrawOptions,
> -                                     void *userData)
> +static void emDM_drawMappedFacesGLSL(
> +        DerivedMesh *dm,
> +        DMSetMaterial setMaterial,
> +        DMSetDrawOptions setDrawOptions,
> +        void *userData)
>  {
>         EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
>         BMEditMesh *em = bmdm->em;
> @@ -1183,15 +1190,17 @@ static void emDM_drawMappedFacesGLSL(DerivedMesh
> *dm,
>         }
>  }
>
> -static void emDM_drawFacesGLSL(DerivedMesh *dm,
> -                               int (*setMaterial)(int matnr, void
> *attribs))
> +static void emDM_drawFacesGLSL(
> +        DerivedMesh *dm,
> +        int (*setMaterial)(int matnr, void *attribs))
>  {
>         dm->drawMappedFacesGLSL(dm, setMaterial, NULL, NULL);
>  }
>
> -static void emDM_drawMappedFacesMat(DerivedMesh *dm,
> -                                    void (*setMaterial)(void *userData,
> int matnr, void *attribs),
> -                                    bool (*setFace)(void *userData, int
> index), void *userData)
> +static void emDM_drawMappedFacesMat(
> +        DerivedMesh *dm,
> +        void (*setMaterial)(void *userData, int matnr, void *attribs),
> +        bool (*setFace)(void *userData, int index), void *userData)
>  {
>         EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
>         BMEditMesh *em = bmdm->em;
> @@ -1803,9 +1812,10 @@ static CustomData
> *bmDm_getPolyDataLayout(DerivedMesh *dm)
>  }
>
>
> -DerivedMesh *getEditDerivedBMesh(BMEditMesh *em,
> -                                 Object *UNUSED(ob),
> -                                 float (*vertexCos)[3])
> +DerivedMesh *getEditDerivedBMesh(
> +        BMEditMesh *em,
> +        Object *UNUSED(ob),
> +        float (*vertexCos)[3])
>  {
>         EditDerivedBMesh *bmdm = MEM_callocN(sizeof(*bmdm), __func__);
>         BMesh *bm = em->bm;
> @@ -2299,8 +2309,9 @@ static void statvis_calc_sharp(
>         }
>  }
>
> -void BKE_editmesh_statvis_calc(BMEditMesh *em, DerivedMesh *dm,
> -                               const MeshStatVis *statvis)
> +void BKE_editmesh_statvis_calc(
> +        BMEditMesh *em, DerivedMesh *dm,
> +        const MeshStatVis *statvis)
>  {
>         EditDerivedBMesh *bmdm = (EditDerivedBMesh *)dm;
>         BLI_assert(dm == NULL || dm->type == DM_TYPE_EDITBMESH);
> @@ -2376,8 +2387,9 @@ struct CageUserData {
>         BLI_bitmap *visit_bitmap;
>  };
>
> -static void cage_mapped_verts_callback(void *userData, int index, const
> float co[3],
> -                                       const float UNUSED(no_f[3]), const
> short UNUSED(no_s[3]))
> +static void cage_mapped_verts_callback(
> +        void *userData, int index, const float co[3],
> +        const float UNUSED(no_f[3]), const short UNUSED(no_s[3]))
>  {
>         struct CageUserData *data = userData;
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>



-- 
With best regards, Sergey Sharybin


More information about the Bf-committers mailing list