From 94cf74afbb1329a9ff099e2ebd7f43ed8313f9ec Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 4 Feb 2021 22:03:39 +0100 Subject: Cleanup/refactor: Undosys: Get rid of the magic values for undo direction. Move `eUndoStepDir` to `BKE_undo_system.h` and use its values everywhere. Note that this also introduce the `STEP_INVALID` value in that enum. Finally, kept the matching struct members in some lower-level readfile code as an `int` to avoid having to include `BKE_undo_system.h` in a lot of unrelated files. --- source/blender/editors/sculpt_paint/paint_curve_undo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/sculpt_paint/paint_curve_undo.c') diff --git a/source/blender/editors/sculpt_paint/paint_curve_undo.c b/source/blender/editors/sculpt_paint/paint_curve_undo.c index a8e22f66734..dbe522bf304 100644 --- a/source/blender/editors/sculpt_paint/paint_curve_undo.c +++ b/source/blender/editors/sculpt_paint/paint_curve_undo.c @@ -126,7 +126,7 @@ static bool paintcurve_undosys_step_encode(struct bContext *C, static void paintcurve_undosys_step_decode(struct bContext *UNUSED(C), struct Main *UNUSED(bmain), UndoStep *us_p, - int UNUSED(dir), + const eUndoStepDir UNUSED(dir), bool UNUSED(is_final)) { PaintCurveUndoStep *us = (PaintCurveUndoStep *)us_p; -- cgit v1.2.3