Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-07-16 16:58:12 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-07-16 16:58:12 +0300
commit72d1fb993445b6233e6d905c867625586bf62bfe (patch)
tree5885b5e0842a48faf10bf69f3959c3a82a3ff922
parent20f3cbfb78b37fdc201d30be52a249cd08fa5d83 (diff)
Cleanup: Use const qualifier for UV vertex map
-rw-r--r--source/blender/blenkernel/BKE_mesh_mapping.h6
-rw-r--r--source/blender/blenkernel/intern/mesh_mapping.c7
2 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_mesh_mapping.h b/source/blender/blenkernel/BKE_mesh_mapping.h
index aedffb17ae6..1005a50a214 100644
--- a/source/blender/blenkernel/BKE_mesh_mapping.h
+++ b/source/blender/blenkernel/BKE_mesh_mapping.h
@@ -104,9 +104,9 @@ typedef struct MeshElemMap {
/* mapping */
UvVertMap *BKE_mesh_uv_vert_map_create(
- struct MPoly *mpoly, struct MLoop *mloop, struct MLoopUV *mloopuv,
- unsigned int totpoly, unsigned int totvert,
- const float limit[2], const bool selected, const bool use_winding);
+ const struct MPoly *mpoly, const struct MLoop *mloop, const struct MLoopUV *mloopuv,
+ unsigned int totpoly, unsigned int totvert, const float limit[2],
+ const bool selected, const bool use_winding);
UvMapVert *BKE_mesh_uv_vert_map_get_vert(UvVertMap *vmap, unsigned int v);
void BKE_mesh_uv_vert_map_free(UvVertMap *vmap);
diff --git a/source/blender/blenkernel/intern/mesh_mapping.c b/source/blender/blenkernel/intern/mesh_mapping.c
index 953d3ff2f96..5c9849f6b74 100644
--- a/source/blender/blenkernel/intern/mesh_mapping.c
+++ b/source/blender/blenkernel/intern/mesh_mapping.c
@@ -55,13 +55,13 @@
* but for now this replaces it because its unused. */
UvVertMap *BKE_mesh_uv_vert_map_create(
- struct MPoly *mpoly, struct MLoop *mloop, struct MLoopUV *mloopuv,
+ const MPoly *mpoly, const MLoop *mloop, const MLoopUV *mloopuv,
unsigned int totpoly, unsigned int totvert,
const float limit[2], const bool selected, const bool use_winding)
{
UvVertMap *vmap;
UvMapVert *buf;
- MPoly *mp;
+ const MPoly *mp;
unsigned int a;
int i, totuv, nverts;
@@ -126,7 +126,8 @@ UvVertMap *BKE_mesh_uv_vert_map_create(
for (a = 0; a < totvert; a++) {
UvMapVert *newvlist = NULL, *vlist = vmap->vert[a];
UvMapVert *iterv, *v, *lastv, *next;
- float *uv, *uv2, uvdiff[2];
+ const float *uv, *uv2;
+ float uvdiff[2];
while (vlist) {
v = vlist;