Cleanup: unused variable, redundant strlen call

This commit is contained in:
Campbell Barton
2024-02-14 13:59:37 +11:00
parent aa6ab9caf9
commit 291ca4ec8e
2 changed files with 1 additions and 3 deletions

View File

@@ -3593,7 +3593,6 @@ static bool knife_snap_angle_relative(KnifeTool_OpData *kcd)
float curr_ray[3], curr_ray_normal[3];
float curr_co[3], curr_cage[3]; /* Unused. */
float plane[4];
float ray_hit[3];
float lambda;

View File

@@ -556,8 +556,7 @@ static void draw_histogram(ARegion *region,
/* Label. */
char buf[10];
SNPRINTF(buf, "%.2f", val);
size_t buf_len = strlen(buf);
const size_t buf_len = SNPRINTF_RLEN(buf, "%.2f", val);
float text_width, text_height;
BLF_width_and_height(BLF_default(), buf, buf_len, &text_width, &text_height);