Cleanup: remove redundant variables & assignments
Co-authored-by: Sean Kim <SeanCTKim@protonmail.com>
This commit is contained in:
parent
5741632e7c
commit
e01525cf2c
@ -19,7 +19,6 @@ MANTA *manta_init(int *res, struct FluidModifierData *fmd)
|
|||||||
void manta_free(MANTA *fluid)
|
void manta_free(MANTA *fluid)
|
||||||
{
|
{
|
||||||
delete fluid;
|
delete fluid;
|
||||||
fluid = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool manta_ensure_obstacle(MANTA *fluid, struct FluidModifierData *fmd)
|
bool manta_ensure_obstacle(MANTA *fluid, struct FluidModifierData *fmd)
|
||||||
|
@ -105,7 +105,6 @@ bool BKE_image_save_options_init(ImageSaveOptions *opts,
|
|||||||
ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, &lock);
|
ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, &lock);
|
||||||
|
|
||||||
if (ibuf) {
|
if (ibuf) {
|
||||||
Scene *scene = opts->scene;
|
|
||||||
bool is_depth_set = false;
|
bool is_depth_set = false;
|
||||||
const char *ima_colorspace = ima->colorspace_settings.name;
|
const char *ima_colorspace = ima->colorspace_settings.name;
|
||||||
|
|
||||||
|
@ -621,7 +621,7 @@ class NodeTreeMainUpdater {
|
|||||||
BLI_STRUCT_EQUALITY_OPERATORS_3(InternalLink, from, to, multi_input_sort_id);
|
BLI_STRUCT_EQUALITY_OPERATORS_3(InternalLink, from, to, multi_input_sort_id);
|
||||||
};
|
};
|
||||||
|
|
||||||
const bNodeLink *first_non_dangling_link(const bNodeTree &ntree,
|
const bNodeLink *first_non_dangling_link(const bNodeTree & /*ntree*/,
|
||||||
const Span<const bNodeLink *> links) const
|
const Span<const bNodeLink *> links) const
|
||||||
{
|
{
|
||||||
for (const bNodeLink *link : links) {
|
for (const bNodeLink *link : links) {
|
||||||
|
@ -481,7 +481,6 @@ static HullAngleIter convexhull_2d_angle_iter_init(const float (*points_hull)[2]
|
|||||||
* has a `sin` of 1.0 (which must always come first). */
|
* has a `sin` of 1.0 (which must always come first). */
|
||||||
for (int axis = 0; axis < 2; axis++) {
|
for (int axis = 0; axis < 2; axis++) {
|
||||||
for (int i = 0; i < 2; i++) {
|
for (int i = 0; i < 2; i++) {
|
||||||
int count = 0;
|
|
||||||
const int i_orig = hiter.axis[axis][i].index;
|
const int i_orig = hiter.axis[axis][i].index;
|
||||||
int i_curr = i_orig, i_prev;
|
int i_curr = i_orig, i_prev;
|
||||||
/* Prevent an eternal loop (incredibly unlikely).
|
/* Prevent an eternal loop (incredibly unlikely).
|
||||||
@ -503,7 +502,6 @@ static HullAngleIter convexhull_2d_angle_iter_init(const float (*points_hull)[2]
|
|||||||
}
|
}
|
||||||
i_curr = i_prev;
|
i_curr = i_prev;
|
||||||
hiter.axis[axis][i].index = i_curr;
|
hiter.axis[axis][i].index = i_curr;
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -152,9 +152,6 @@ int bm_mesh_calc_uv_islands(const Scene *scene,
|
|||||||
const int faces_len = group_index[i][1];
|
const int faces_len = group_index[i][1];
|
||||||
BMFace **faces = static_cast<BMFace **>(MEM_mallocN(sizeof(*faces) * faces_len, __func__));
|
BMFace **faces = static_cast<BMFace **>(MEM_mallocN(sizeof(*faces) * faces_len, __func__));
|
||||||
|
|
||||||
float bounds_min[2], bounds_max[2];
|
|
||||||
INIT_MINMAX2(bounds_min, bounds_max);
|
|
||||||
|
|
||||||
for (int j = 0; j < faces_len; j++) {
|
for (int j = 0; j < faces_len; j++) {
|
||||||
faces[j] = BM_face_at_index(bm, groups_array[faces_start + j]);
|
faces[j] = BM_face_at_index(bm, groups_array[faces_start + j]);
|
||||||
}
|
}
|
||||||
|
@ -1320,7 +1320,6 @@ static PyObject *M_Geometry_tessellate_polygon(PyObject * /*self*/, PyObject *po
|
|||||||
if (len_polypoints > 0) { /* don't bother adding edges as polylines */
|
if (len_polypoints > 0) { /* don't bother adding edges as polylines */
|
||||||
dl = static_cast<DispList *>(MEM_callocN(sizeof(DispList), "poly disp"));
|
dl = static_cast<DispList *>(MEM_callocN(sizeof(DispList), "poly disp"));
|
||||||
BLI_addtail(&dispbase, dl);
|
BLI_addtail(&dispbase, dl);
|
||||||
dl->type = DL_INDEX3;
|
|
||||||
dl->nr = len_polypoints;
|
dl->nr = len_polypoints;
|
||||||
dl->type = DL_POLY;
|
dl->type = DL_POLY;
|
||||||
dl->parts = 1; /* no faces, 1 edge loop */
|
dl->parts = 1; /* no faces, 1 edge loop */
|
||||||
|
@ -1980,7 +1980,6 @@ void WM_keyconfig_update_ex(wmWindowManager *wm, bool keep_properties)
|
|||||||
*
|
*
|
||||||
* In practice both cases are quite unlikely though. */
|
* In practice both cases are quite unlikely though. */
|
||||||
if (U.space_data.section_active == USER_SECTION_KEYMAP) {
|
if (U.space_data.section_active == USER_SECTION_KEYMAP) {
|
||||||
wmWindowManager *wm = static_cast<wmWindowManager *>(G_MAIN->wm.first);
|
|
||||||
LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
|
LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
|
||||||
bScreen *screen = WM_window_get_active_screen(win);
|
bScreen *screen = WM_window_get_active_screen(win);
|
||||||
LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
|
LISTBASE_FOREACH (ScrArea *, area, &screen->areabase) {
|
||||||
|
Loading…
Reference in New Issue
Block a user