Cleanup: use ELEM macro, remove redundant "struct"

This commit is contained in:
Campbell Barton 2024-03-19 14:17:47 +11:00
parent 573146518d
commit 38dc888d7f
3 changed files with 5 additions and 5 deletions

@ -240,7 +240,7 @@ static void evaluate_coarse_union(const Span<CourseBoundary> boundaries, CoarseR
break;
}
case CoarseSegment::Type::Copy: {
if (copy_from_mask != nullptr && copy_from_mask != active_segment->mask) {
if (!ELEM(copy_from_mask, nullptr, active_segment->mask)) {
copy_from_single_mask = false;
}
copy_from_mask = active_segment->mask;
@ -312,7 +312,7 @@ static void evaluate_coarse_intersection(const Span<CourseBoundary> boundaries,
}
case CoarseSegment::Type::Copy: {
copy_count++;
if (copy_from_mask != nullptr && copy_from_mask != active_segment->mask) {
if (!ELEM(copy_from_mask, nullptr, active_segment->mask)) {
copy_from_single_mask = false;
}
copy_from_mask = active_segment->mask;

@ -1865,7 +1865,7 @@ bool DRW_render_check_grease_pencil(Depsgraph *depsgraph)
deg_iter_settings.depsgraph = depsgraph;
deg_iter_settings.flags = DEG_OBJECT_ITER_FOR_RENDER_ENGINE_FLAGS;
DEG_OBJECT_ITER_BEGIN (&deg_iter_settings, ob) {
if (ob->type == OB_GPENCIL_LEGACY || ob->type == OB_GREASE_PENCIL) {
if (ELEM(ob->type, OB_GPENCIL_LEGACY, OB_GREASE_PENCIL)) {
if (DRW_object_visibility_in_active_context(ob) & OB_VISIBLE_SELF) {
return true;
}

@ -60,7 +60,7 @@ static PyObject *py_argv_from_bytes(const int argc, const char **argv)
/** \name Internal Implementation
* \{ */
static int bpy_cli_command_exec(struct bContext *C,
static int bpy_cli_command_exec(bContext *C,
PyObject *py_exec_fn,
const int argc,
const char **argv)
@ -171,7 +171,7 @@ class BPyCommandHandler : public CommandHandler {
bpy_cli_command_free(this->py_exec_fn);
}
int exec(struct bContext *C, int argc, const char **argv) override
int exec(bContext *C, int argc, const char **argv) override
{
return bpy_cli_command_exec(C, this->py_exec_fn, argc, argv);
}