Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-02-16 19:55:10 +0300
committerHans Goudey <h.goudey@me.com>2021-02-16 19:55:10 +0300
commit520d965c77f9109492013d33cff659cd6055ff11 (patch)
tree5fbf5e6e8ffc917d158f6a46634209442efc3182 /source/blender/editors/gpencil/gpencil_undo.c
parent8971018eb64a68119687c74db875fd45f89cbdf8 (diff)
Cleanup: Compile node_draw.c with C++
This will allow using C++ data structures to draw node error messages. This required removing a forward declared enum for grease pencil undo. Compiles with clang tidy.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_undo.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_undo.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c
index 583878883fa..ede1d3eefaa 100644
--- a/source/blender/editors/gpencil/gpencil_undo.c
+++ b/source/blender/editors/gpencil/gpencil_undo.c
@@ -62,19 +62,23 @@ int ED_gpencil_session_active(void)
return (BLI_listbase_is_empty(&undo_nodes) == false);
}
-int ED_undo_gpencil_step(bContext *C, const eUndoStepDir step)
+/**
+ * \param step: eUndoStepDir.
+ */
+int ED_undo_gpencil_step(bContext *C, const int step)
{
bGPdata **gpd_ptr = NULL, *new_gpd = NULL;
gpd_ptr = ED_gpencil_data_get_pointers(C, NULL);
- if (step == STEP_UNDO) {
+ const eUndoStepDir undo_step = (eUndoStepDir)step;
+ if (undo_step == STEP_UNDO) {
if (cur_node->prev) {
cur_node = cur_node->prev;
new_gpd = cur_node->gpd;
}
}
- else if (step == STEP_REDO) {
+ else if (undo_step == STEP_REDO) {
if (cur_node->next) {
cur_node = cur_node->next;
new_gpd = cur_node->gpd;