Cleanup: silence warnings

```
warning: assignment discards ‘const’ qualifier from pointer target
warning: declaration of ‘co’ shadows a parameter
```
This commit is contained in:
Germano Cavalcante 2021-10-25 12:31:46 -03:00
parent 08a1492ae5
commit 046a99d580
2 changed files with 12 additions and 9 deletions

View File

@ -441,16 +441,19 @@ void imm_draw_cube_corners_3d(uint pos,
immBegin(GPU_PRIM_LINES, ARRAY_SIZE(cube_line_index) * 4);
for (int i = 0; i < ARRAY_SIZE(cube_line_index); i++) {
float vec[3], co[3];
float vec[3], _co[3];
sub_v3_v3v3(vec, coords[cube_line_index[i][1]], coords[cube_line_index[i][0]]);
mul_v3_fl(vec, factor);
immVertex3fv(pos, coords[cube_line_index[i][0]]);
add_v3_v3v3(co, coords[cube_line_index[i][0]], vec);
immVertex3fv(pos, co);
sub_v3_v3v3(co, coords[cube_line_index[i][1]], vec);
immVertex3fv(pos, co);
immVertex3fv(pos, coords[cube_line_index[i][1]]);
copy_v3_v3(_co, coords[cube_line_index[i][0]]);
immVertex3fv(pos, _co);
add_v3_v3(_co, vec);
immVertex3fv(pos, _co);
copy_v3_v3(_co, coords[cube_line_index[i][1]]);
immVertex3fv(pos, _co);
sub_v3_v3(_co, vec);
immVertex3fv(pos, _co);
}
immEnd();
}

View File

@ -711,7 +711,7 @@ static void wm_drag_draw_tooltip(bContext *C, wmWindow *win, wmDrag *drag, const
int iconsize = UI_DPI_ICON_SIZE;
int padding = 4 * UI_DPI_FAC;
char *tooltip = NULL;
const char *tooltip = NULL;
bool free_tooltip = false;
if (UI_but_active_drop_name(C)) {
tooltip = IFACE_("Paste name");
@ -747,7 +747,7 @@ static void wm_drag_draw_tooltip(bContext *C, wmWindow *win, wmDrag *drag, const
wm_drop_operator_draw(tooltip, x, y);
if (free_tooltip) {
MEM_freeN(tooltip);
MEM_freeN((void *)tooltip);
}
}
}