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:
authorChris Blackbourn <chrisbblend@gmail.com>2022-08-06 04:53:46 +0300
committerChris Blackbourn <chrisbblend@gmail.com>2022-08-06 04:54:40 +0300
commitfcd61d2056f8988ded3d0ee35696aad0b424edc8 (patch)
treedbe064e0e9294d84151c4c92d6da41286f7af968 /source/blender/geometry
parent0d62e963b06eccaee2e9f33a10954e7768b81189 (diff)
Cleanup: Move uv_parametrizer.c to C++
Differential Review: https://developer.blender.org/D15618
Diffstat (limited to 'source/blender/geometry')
-rw-r--r--source/blender/geometry/CMakeLists.txt2
-rw-r--r--source/blender/geometry/intern/uv_parametrizer.cc (renamed from source/blender/geometry/intern/uv_parametrizer.c)8
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/geometry/CMakeLists.txt b/source/blender/geometry/CMakeLists.txt
index da83d9e8957..0f06890cbfa 100644
--- a/source/blender/geometry/CMakeLists.txt
+++ b/source/blender/geometry/CMakeLists.txt
@@ -27,7 +27,7 @@ set(SRC
intern/reverse_uv_sampler.cc
intern/set_curve_type.cc
intern/subdivide_curves.cc
- intern/uv_parametrizer.c
+ intern/uv_parametrizer.cc
GEO_add_curves_on_mesh.hh
GEO_fillet_curves.hh
diff --git a/source/blender/geometry/intern/uv_parametrizer.c b/source/blender/geometry/intern/uv_parametrizer.cc
index fecbb0edc47..efda55e2669 100644
--- a/source/blender/geometry/intern/uv_parametrizer.c
+++ b/source/blender/geometry/intern/uv_parametrizer.cc
@@ -2287,7 +2287,7 @@ static void p_abf_setup_system(PAbfSystem *sys)
sys->lambdaPlanar = (float *)MEM_callocN(sizeof(float) * sys->ninterior, "ABFlamdaplane");
sys->lambdaLength = (float *)MEM_mallocN(sizeof(float) * sys->ninterior, "ABFlambdalen");
- sys->J2dt = MEM_mallocN(sizeof(float) * sys->nangles * 3, "ABFj2dt");
+ sys->J2dt = static_cast<float(*)[3]>(MEM_mallocN(sizeof(float) * sys->nangles * 3, "ABFj2dt"));
sys->bstar = (float *)MEM_mallocN(sizeof(float) * sys->nfaces, "ABFbstar");
sys->dstar = (float *)MEM_mallocN(sizeof(float) * sys->nfaces, "ABFdstar");
@@ -3666,7 +3666,7 @@ static void p_chart_rotate_minimum_area(PChart *chart)
static void p_chart_rotate_fit_aabb(PChart *chart)
{
- float(*points)[2] = MEM_mallocN(sizeof(*points) * chart->nverts, __func__);
+ float(*points)[2] = static_cast<float(*)[2]>(MEM_mallocN(sizeof(*points) * chart->nverts, __func__));
p_chart_uv_to_array(chart, points);
@@ -3827,8 +3827,8 @@ static void p_add_ngon(ParamHandle *handle,
MemArena *arena = handle->polyfill_arena;
Heap *heap = handle->polyfill_heap;
uint nfilltri = nverts - 2;
- uint(*tris)[3] = BLI_memarena_alloc(arena, sizeof(*tris) * (size_t)nfilltri);
- float(*projverts)[2] = BLI_memarena_alloc(arena, sizeof(*projverts) * (size_t)nverts);
+ uint(*tris)[3] = static_cast<uint(*)[3]>(BLI_memarena_alloc(arena, sizeof(*tris) * (size_t)nfilltri));
+ float(*projverts)[2] = static_cast<float(*)[2]>(BLI_memarena_alloc(arena, sizeof(*projverts) * (size_t)nverts));
/* Calc normal, flipped: to get a positive 2d cross product. */
float normal[3];