Clang-Tidy: Enable bugprone-misplaced-widening-cast
This commit is contained in:
parent
4a5389816b
commit
cad2d32be6
@ -36,7 +36,6 @@ Checks: >
|
||||
-bugprone-integer-division,
|
||||
-bugprone-incorrect-roundings,
|
||||
-bugprone-suspicious-string-compare,
|
||||
-bugprone-misplaced-widening-cast,
|
||||
-bugprone-not-null-terminated-result,
|
||||
-bugprone-suspicious-missing-comma,
|
||||
-bugprone-parent-virtual-call,
|
||||
|
@ -297,7 +297,7 @@ void blf_font_size(FontBLF *font, unsigned int size, unsigned int dpi)
|
||||
}
|
||||
}
|
||||
|
||||
err = FT_Set_Char_Size(font->face, 0, (FT_F26Dot6)(size * 64), dpi, dpi);
|
||||
err = FT_Set_Char_Size(font->face, 0, ((FT_F26Dot6)(size)) * 64, dpi, dpi);
|
||||
if (err) {
|
||||
/* FIXME: here we can go through the fixed size and choice a close one */
|
||||
printf("The current font don't support the size, %u and dpi, %u\n", size, dpi);
|
||||
|
@ -1515,7 +1515,7 @@ static void ui_text_clip_right_ex(const uiFontStyle *fstyle,
|
||||
l_end = BLF_width_to_strlen(fstyle->uifont_id, str, max_len, okwidth - sep_strwidth, &tmp);
|
||||
memcpy(str + l_end, sep, sep_len + 1); /* +1 for trailing '\0'. */
|
||||
if (r_final_len) {
|
||||
*r_final_len = (size_t)(l_end + sep_len);
|
||||
*r_final_len = (size_t)(l_end) + sep_len;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -619,7 +619,7 @@ static void undomesh_to_editmesh(UndoMesh *um, Object *ob, BMEditMesh *em, Key *
|
||||
if (kb_act->totelem != um->me.totvert) {
|
||||
/* The current mesh has some extra/missing verts compared to the undo, adjust. */
|
||||
MEM_SAFE_FREE(kb_act->data);
|
||||
kb_act->data = MEM_mallocN((size_t)(key->elemsize * bm->totvert), __func__);
|
||||
kb_act->data = MEM_mallocN((size_t)(key->elemsize) * bm->totvert, __func__);
|
||||
kb_act->totelem = um->me.totvert;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user