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:
authorCampbell Barton <ideasman42@gmail.com>2018-04-03 17:46:11 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-04-03 18:03:33 +0300
commit75de21f0722c3a7d674c208cf6af95044637828f (patch)
treee7c01d6cc415def033f80bc586afc1536fb2a6cc /source/blender/blenkernel/BKE_undo_system.h
parent53f068454e8c774ef68997f3b8afb5da9417b03c (diff)
Undo System: id-map avoid duplicate add/lookup
Add versions of add/lookup that check the previous item.
Diffstat (limited to 'source/blender/blenkernel/BKE_undo_system.h')
-rw-r--r--source/blender/blenkernel/BKE_undo_system.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_undo_system.h b/source/blender/blenkernel/BKE_undo_system.h
index 6072ecfae4a..d2a322a50f0 100644
--- a/source/blender/blenkernel/BKE_undo_system.h
+++ b/source/blender/blenkernel/BKE_undo_system.h
@@ -180,7 +180,15 @@ struct UndoIDPtrMap *BKE_undosys_ID_map_create(void);
void BKE_undosys_ID_map_destroy(struct UndoIDPtrMap *map);
void BKE_undosys_ID_map_add(struct UndoIDPtrMap *map, ID *id);
struct ID *BKE_undosys_ID_map_lookup(const struct UndoIDPtrMap *map, const struct ID *id_src);
-void BKE_undosys_ID_map_foreach_ID_ref(
+
+void BKE_undosys_ID_map_add_with_prev(
+ struct UndoIDPtrMap *map, struct ID *id,
+ struct ID **id_prev);
+struct ID *BKE_undosys_ID_map_lookup_with_prev(
+ const struct UndoIDPtrMap *map, struct ID *id_src,
+ struct ID *id_prev_match[2]);
+
+void BKE_undosys_ID_map_foreach_ID_ref(
struct UndoIDPtrMap *map,
UndoTypeForEachIDRefFn foreach_ID_ref_fn, void *user_data);