Cleanup: Avoid comparing bool to int value

Pull Request: https://projects.blender.org/blender/blender/pulls/130483
This commit is contained in:
Sean Kim
2024-11-20 20:48:42 +01:00
committed by Sean Kim
parent 9945d511a9
commit 94fda917de

View File

@@ -1648,7 +1648,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event, PaintS
int paint_stroke_exec(bContext *C, wmOperator *op, PaintStroke *stroke)
{
/* only when executed for the first time */
if (stroke->stroke_started == 0) {
if (!stroke->stroke_started) {
PointerRNA firstpoint;
PropertyRNA *strokeprop = RNA_struct_find_property(op->ptr, "stroke");
@@ -1666,7 +1666,7 @@ int paint_stroke_exec(bContext *C, wmOperator *op, PaintStroke *stroke)
RNA_END;
}
const bool ok = stroke->stroke_started != 0;
const bool ok = stroke->stroke_started;
stroke_done(C, op, stroke);