Cleanup: quiet warnings

This commit is contained in:
Campbell Barton
2022-06-09 09:48:37 +10:00
parent 4ff9c0f4e3
commit 530f2abb9b
4 changed files with 9 additions and 9 deletions

View File

@@ -222,7 +222,7 @@ void DRW_opengl_context_activate(bool drw_state);
void DRW_draw_cursor_2d_ex(const struct ARegion *region, const float cursor[2]);
void DRW_cdlayer_attr_aliases_add(struct GPUVertFormat *format,
char *base_name,
const char *base_name,
const struct CustomData *data,
const struct CustomDataLayer *cl,
bool is_active_render,

View File

@@ -3412,8 +3412,8 @@ void DRW_batch_cache_free_old(Object *ob, int ctime)
/** \} */
void DRW_cdlayer_attr_aliases_add(GPUVertFormat *format,
char *base_name,
const CustomData *data,
const char *base_name,
const CustomData *UNUSED(data),
const CustomDataLayer *cl,
bool is_active_render,
bool is_active_layer)

View File

@@ -151,7 +151,7 @@ struct GPUBatch *GPU_pbvh_buffers_batch_get(GPU_PBVH_Buffers *buffers, bool fast
short GPU_pbvh_buffers_material_index_get(GPU_PBVH_Buffers *buffers);
bool GPU_pbvh_buffers_has_overlays(GPU_PBVH_Buffers *buffers);
PBVHGPUFormat *GPU_pbvh_make_format();
PBVHGPUFormat *GPU_pbvh_make_format(void);
void GPU_pbvh_free_format(PBVHGPUFormat *vbo_id);
#ifdef __cplusplus

View File

@@ -1206,17 +1206,17 @@ static int gpu_pbvh_make_attr_offs(eAttrDomainMask domain_mask,
const CustomDataLayer *active_layer,
const CustomDataLayer *render_layer)
{
const CustomData *cdata = active_domain == ATTR_DOMAIN_POINT ? vdata : ldata;
const CustomData *cdata_active = active_domain == ATTR_DOMAIN_POINT ? vdata : ldata;
if (!cdata) {
if (!cdata_active) {
return 0;
}
if (active_only) {
int idx = active_layer ? active_layer - cdata->layers : -1;
int idx = active_layer ? active_layer - cdata_active->layers : -1;
if (idx >= 0 && idx < cdata->totlayer) {
r_cd_attrs[0].cd_offset = cdata->layers[idx].offset;
if (idx >= 0 && idx < cdata_active->totlayer) {
r_cd_attrs[0].cd_offset = cdata_active->layers[idx].offset;
r_cd_attrs[0].domain = active_domain;
r_cd_attrs[0].type = active_type;
r_cd_attrs[0].layer_idx = idx;