Cleanup: default initialize members of ParamHandle

This commit is contained in:
Brecht Van Lommel 2023-11-24 18:18:27 +01:00
parent bf97bc634f
commit c1f931a399
2 changed files with 15 additions and 27 deletions

View File

@ -35,26 +35,26 @@ class ParamHandle {
ParamHandle();
~ParamHandle();
PHandleState state;
MemArena *arena;
MemArena *polyfill_arena;
Heap *polyfill_heap;
PHandleState state = PHANDLE_STATE_ALLOCATED;
MemArena *arena = nullptr;
MemArena *polyfill_arena = nullptr;
Heap *polyfill_heap = nullptr;
PChart *construction_chart;
PHash *hash_verts;
PHash *hash_edges;
PHash *hash_faces;
PChart *construction_chart = nullptr;
PHash *hash_verts = nullptr;
PHash *hash_edges = nullptr;
PHash *hash_faces = nullptr;
GHash *pin_hash;
int unique_pin_count;
GHash *pin_hash = nullptr;
int unique_pin_count = 0;
PChart **charts;
int ncharts;
PChart **charts = nullptr;
int ncharts = 0;
float aspect_y;
float aspect_y = 1.0f;
RNG *rng;
float blend;
RNG *rng = nullptr;
float blend = 0.0f;
};
/* -------------------------------------------------------------------- */

View File

@ -3618,7 +3618,6 @@ static void p_chart_rotate_fit_aabb(PChart *chart)
ParamHandle::ParamHandle()
{
state = PHANDLE_STATE_ALLOCATED;
arena = BLI_memarena_new(MEM_SIZE_OPTIMAL(1 << 16), "param construct arena");
polyfill_arena = BLI_memarena_new(BLI_MEMARENA_STD_BUFSIZE, "param polyfill arena");
polyfill_heap = BLI_heap_new_ex(BLI_POLYFILL_ALLOC_NGON_RESERVE);
@ -3628,17 +3627,6 @@ ParamHandle::ParamHandle()
hash_verts = phash_new((PHashLink **)&construction_chart->verts, 1);
hash_edges = phash_new((PHashLink **)&construction_chart->edges, 1);
hash_faces = phash_new((PHashLink **)&construction_chart->faces, 1);
pin_hash = nullptr;
unique_pin_count = 0;
charts = nullptr;
ncharts = 0;
aspect_y = 1.0f;
rng = nullptr;
blend = 0.0f;
}
ParamHandle::~ParamHandle()