Cleanup: compiler warnings

This commit is contained in:
Campbell Barton 2023-04-05 14:23:54 +10:00
parent 8216623e25
commit d683665095
4 changed files with 7 additions and 7 deletions

View File

@ -4820,7 +4820,7 @@ static void customdata_data_transfer_interp_generic(const CustomDataTransferLaye
return;
}
if (data_type & CD_FAKE) {
if (int(data_type) & CD_FAKE) {
data_size = laymap->data_size;
}
else {
@ -4891,7 +4891,7 @@ static void customdata_data_transfer_interp_generic(const CustomDataTransferLaye
copy_bit_flag(data_dst, tmp_dst, data_size, data_flag);
}
}
else if (!(data_type & CD_FAKE)) {
else if (!(int(data_type) & CD_FAKE)) {
CustomData_data_mix_value(data_type, tmp_dst, data_dst, mix_mode, mix_factor);
}
/* Else we can do nothing by default, needs custom interp func!
@ -4970,7 +4970,7 @@ void CustomData_data_transfer(const MeshPairRemap *me_remap,
tmp_buff_size, sizeof(*tmp_data_src), __func__);
}
if (data_type & CD_FAKE) {
if (int(data_type) & CD_FAKE) {
data_step = laymap->elem_size;
data_size = laymap->data_size;
data_offset = laymap->data_offset;

View File

@ -116,7 +116,7 @@ bool BKE_shrinkwrap_init_tree(
data->mesh = mesh;
data->poly_offsets = mesh->poly_offsets().data();
data->corner_edges = mesh->corner_edges().data();
data->vert_normals = reinterpret_cast<const float(*)[3]>(mesh->vert_normals().data()),
data->vert_normals = reinterpret_cast<const float(*)[3]>(mesh->vert_normals().data());
data->sharp_faces = static_cast<const bool *>(
CustomData_get_layer_named(&mesh->edata, CD_PROP_BOOL, "sharp_face"));

View File

@ -10,7 +10,7 @@ void GlareStreaksOperation::generate_glare(float *data,
const NodeGlare *settings)
{
int x, y, n;
uint nump = 0;
// uint nump = 0; /* UNUSED. */
float c1[4], c2[4], c3[4], c4[4];
float a, ang = DEG2RADF(360.0f) / float(settings->streaks);
@ -80,7 +80,7 @@ void GlareStreaksOperation::generate_glare(float *data,
tdst.clear();
memcpy(tsrc.get_buffer(), input_tile->get_buffer(), sizeof(float) * size4);
nump++;
// nump++; /* UNUSED. */
}
}

View File

@ -394,7 +394,7 @@ typedef struct GPUSamplerState {
#ifndef __cplusplus
/** Identical to GPUSamplerState::default_sampler for non C++ users. */
const static GPUSamplerState GPU_SAMPLER_DEFAULT = {GPU_SAMPLER_FILTERING_DEFAULT,
static const GPUSamplerState GPU_SAMPLER_DEFAULT = {GPU_SAMPLER_FILTERING_DEFAULT,
GPU_SAMPLER_EXTEND_MODE_EXTEND,
GPU_SAMPLER_EXTEND_MODE_EXTEND,
GPU_SAMPLER_CUSTOM_COMPARE,