Cleanup: unused variable, redundant strlen call
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user