Cleanup: minor style tweaks, surround ELEM by parenthesis

This commit is contained in:
Campbell Barton 2023-12-10 17:12:53 +11:00
parent 21fbd9dbd7
commit ff47eb3e37
4 changed files with 3 additions and 4 deletions

View File

@ -303,7 +303,6 @@ class GHOST_DeviceVK {
}
fprintf(stderr, "Couldn't find any Graphic queue family on selected device\n");
return;
}
};

View File

@ -347,7 +347,7 @@ static GlyphBLF *blf_glyph_cache_add_glyph(FontBLF *font,
}
}
else {
memcpy(g->bitmap, glyph->bitmap.buffer, (size_t)buffer_size);
memcpy(g->bitmap, glyph->bitmap.buffer, size_t(buffer_size));
}
}

View File

@ -2701,7 +2701,7 @@ bool isect_sweeping_sphere_tri_v3(const float p1[3],
z = x + y - (a * c - b * b);
if (z <= 0.0f && (x >= 0.0f && y >= 0.0f)) {
//(((uint)z)& ~(((uint)x)|((uint)y))) & 0x80000000) {
// ((uint32_t(z) & ~(uint32_t(x) | uint32_t(y))) & 0x80000000)
*r_lambda = t0;
copy_v3_v3(ipoint, point);
return true;

View File

@ -236,7 +236,7 @@ class VoronoiMetricFunction : public mf::MultiFunction {
{
BLI_assert(dimensions >= 1 && dimensions <= 4);
BLI_assert(feature >= 0 && feature <= 4);
if ELEM (metric_, SHD_VORONOI_MINKOWSKI) {
if (ELEM(metric_, SHD_VORONOI_MINKOWSKI)) {
static std::array<mf::Signature, 12> signatures{
create_signature(1, SHD_VORONOI_F1, SHD_VORONOI_MINKOWSKI),
create_signature(2, SHD_VORONOI_F1, SHD_VORONOI_MINKOWSKI),