code cleanup: minor changes, replace len_v3 with len_squared_v3 for comparison.
This commit is contained in:
@@ -319,7 +319,7 @@ void poly_rotate_plane(const float normal[3], float (*verts)[3], const int nvert
|
||||
if (angle < FLT_EPSILON)
|
||||
return;
|
||||
|
||||
if (len_v3(axis) < FLT_EPSILON) {
|
||||
if (len_squared_v3(axis) < FLT_EPSILON) {
|
||||
axis[0] = 0.0f;
|
||||
axis[1] = 1.0f;
|
||||
axis[2] = 0.0f;
|
||||
|
||||
@@ -346,7 +346,7 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, const rcti *re
|
||||
(roundboxalign & (UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT)) == (UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT)) ? 1 : 2;
|
||||
|
||||
minsize = min_ii(BLI_rcti_size_x(rect) * hnum,
|
||||
BLI_rcti_size_y(rect) * vnum);
|
||||
BLI_rcti_size_y(rect) * vnum);
|
||||
|
||||
if (2.0f * rad > minsize)
|
||||
rad = 0.5f * minsize;
|
||||
|
||||
@@ -409,7 +409,7 @@ static void draw_spline_curve(const bContext *C, MaskLayer *masklay, MaskSpline
|
||||
int width, int height)
|
||||
{
|
||||
const unsigned int resol = max_ii(BKE_mask_spline_feather_resolution(spline, width, height),
|
||||
BKE_mask_spline_resolution(spline, width, height));
|
||||
BKE_mask_spline_resolution(spline, width, height));
|
||||
|
||||
unsigned char rgb_tmp[4];
|
||||
|
||||
|
||||
@@ -153,11 +153,10 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
|
||||
|
||||
static void meshcache_do(
|
||||
MeshCacheModifierData *mcmd, Object *ob, DerivedMesh *UNUSED(dm),
|
||||
float (*vertexCos_)[3], int numVerts)
|
||||
float (*vertexCos_Real)[3], int numVerts)
|
||||
{
|
||||
float (*vertexCos_Store)[3] = (mcmd->factor < 1.0f) ?
|
||||
MEM_mallocN(sizeof(*vertexCos_Store) * numVerts, __func__) : NULL;
|
||||
float (*vertexCos_Real)[3] = vertexCos_;
|
||||
float (*vertexCos)[3] = vertexCos_Store ? vertexCos_Store : vertexCos_Real;
|
||||
|
||||
Scene *scene = mcmd->modifier.scene;
|
||||
|
||||
Reference in New Issue
Block a user