Cleanup: quiet compiler warnings

This commit is contained in:
Campbell Barton 2023-07-27 10:49:43 +10:00
parent c66a694056
commit a838e141fe
4 changed files with 6 additions and 7 deletions

View File

@ -308,10 +308,9 @@ static void version_principled_bsdf_sheen(bNodeTree *ntree)
/* Change socket type to Color. */
nodeModifySocketTypeStatic(ntree, node, input, SOCK_RGBA, 0);
/* Account for the change in intensity between the old and new model.
* If the Sheen input is set to a fixed value, adjust it and set the tint to white.
* Otherwise, if it's connected, keep it as-is but set the tint to 0.2 instead. */
static float default_value_dim[] = {0.2f, 0.2f, 0.2f, 1.0f};
/* Account for the change in intensity between the old and new model.
* If the Sheen input is set to a fixed value, adjust it and set the tint to white.
* Otherwise, if it's connected, keep it as-is but set the tint to 0.2 instead. */
bNodeSocket *sheen = nodeFindSocket(node, SOCK_IN, "Sheen");
if (sheen != nullptr && sheen->link == nullptr) {
*version_cycles_node_socket_float_value(sheen) *= 0.2f;

View File

@ -429,7 +429,7 @@ void BM_face_calc_tangent_edge_diagonal(const BMFace *f, float r_tangent[3])
BMLoop *l_iter_other = l_iter->next;
BMLoop *l_iter_last = l_iter->prev;
do {
BLI_assert(!ELEM(l_iter->v->co, l_iter_other->v->co, l_iter_other->next->v->co));
BLI_assert(!ELEM(l_iter->v, l_iter_other->v, l_iter_other->next->v));
float co_other[3], vec[3];
closest_to_line_segment_v3(
co_other, l_iter->v->co, l_iter_other->v->co, l_iter_other->next->v->co);

View File

@ -2063,7 +2063,7 @@ static void gpencil_brush_delete_mode_brushes(Main *bmain,
}
short preset = (brush->gpencil_settings) ? brush->gpencil_settings->preset_type :
GP_BRUSH_PRESET_UNKNOWN;
short(GP_BRUSH_PRESET_UNKNOWN);
if (preset != GP_BRUSH_PRESET_UNKNOWN) {
/* Verify to delete only the brushes of the current mode. */

View File

@ -78,7 +78,7 @@ static void deformStroke(GpencilModifierData *md,
}
/* For strokes with less than 3 points, only the Simple Subdivision makes sense. */
short type = gps->totpoints < 3 ? GP_SUBDIV_SIMPLE : mmd->type;
short type = gps->totpoints < 3 ? short(GP_SUBDIV_SIMPLE) : mmd->type;
BKE_gpencil_stroke_subdivide(gpd, gps, mmd->level, type);
}