Cleanup: quiet compiler warnings

This commit is contained in:
Campbell Barton
2023-07-28 09:38:05 +10:00
parent e4437f15f3
commit 257cf12439
3 changed files with 5 additions and 4 deletions

View File

@@ -78,9 +78,9 @@ static void basic_cache_init(void *vedata)
/* Twice for normal and in front objects. */
for (int i = 0; i < 2; i++) {
DRWState clip_state = DRWState(
(draw_ctx->sh_cfg == GPU_SHADER_CFG_CLIPPED) ? DRW_STATE_CLIP_PLANES : 0);
(draw_ctx->sh_cfg == GPU_SHADER_CFG_CLIPPED) ? DRW_STATE_CLIP_PLANES : DRW_STATE_NO_DRAW);
DRWState infront_state = DRWState(
(DRW_state_is_select() && (i == 1)) ? DRW_STATE_IN_FRONT_SELECT : 0);
(DRW_state_is_select() && (i == 1)) ? DRW_STATE_IN_FRONT_SELECT : DRW_STATE_NO_DRAW);
DRWState state = DRW_STATE_WRITE_DEPTH | DRW_STATE_DEPTH_LESS_EQUAL;
GPUShader *sh = DRW_state_is_select() ?

View File

@@ -187,7 +187,8 @@ GPENCIL_MaterialPool *gpencil_material_pool_create(GPENCIL_PrivateData *pd, Obje
V3D_SHADING_VERTEX_COLOR :
pd->v3d_color_type;
const eV3DShadingLightingMode lighting_mode = eV3DShadingLightingMode(
(pd->v3d != nullptr) ? pd->v3d->shading.light : V3D_LIGHTING_STUDIO);
(pd->v3d != nullptr) ? eV3DShadingLightingMode(pd->v3d->shading.light) :
V3D_LIGHTING_STUDIO);
GPENCIL_MaterialPool *pool = matpool;
for (int i = 0; i < mat_len; i++) {

View File

@@ -927,7 +927,7 @@ GPUBatch *DRW_cache_object_surface_get(Object *ob)
GPUVertBuf *DRW_cache_object_pos_vertbuf_get(Object *ob)
{
Mesh *me = BKE_object_get_evaluated_mesh_no_subsurf(ob);
short type = (me != nullptr) ? OB_MESH : ob->type;
short type = (me != nullptr) ? short(OB_MESH) : ob->type;
switch (type) {
case OB_MESH: