Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/undo_system.c
| Show First 20 Lines • Show All 711 Lines • ▼ Show 20 Lines | for (UndoStep *us_iter = us_reference->next; us_iter != NULL; us_iter = us_iter->next) { | ||||
| } | } | ||||
| } | } | ||||
| for (UndoStep *us_iter = us_reference->prev; us_iter != NULL; us_iter = us_iter->prev) { | for (UndoStep *us_iter = us_reference->prev; us_iter != NULL; us_iter = us_iter->prev) { | ||||
| if (us_iter == us_target) { | if (us_iter == us_target) { | ||||
| return STEP_UNDO; | return STEP_UNDO; | ||||
| } | } | ||||
| } | } | ||||
| BLI_assert(!"Target undo step not found, this should not happen and may indicate an undo stack corruption"); | BLI_assert_msg(0, | ||||
| "Target undo step not found, this should not happen and may indicate an undo " | |||||
| "stack corruption"); | |||||
| return STEP_INVALID; | return STEP_INVALID; | ||||
| } | } | ||||
| /** | /** | ||||
| * When reading undo steps for undo/redo, | * When reading undo steps for undo/redo, | ||||
| * some extra checks are needed when so the correct undo step is decoded. | * some extra checks are needed when so the correct undo step is decoded. | ||||
| */ | */ | ||||
| static UndoStep *undosys_step_iter_first(UndoStep *us_reference, const eUndoStepDir undo_dir) | static UndoStep *undosys_step_iter_first(UndoStep *us_reference, const eUndoStepDir undo_dir) | ||||
| ▲ Show 20 Lines • Show All 337 Lines • Show Last 20 Lines | |||||