diff options
Diffstat (limited to 'source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_modifier.h')
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_modifier.h | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_modifier.h b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_modifier.h index a5bdf2359ee..f02dc73c392 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_modifier.h +++ b/source/blender/depsgraph/intern/eval/deg_eval_runtime_backup_modifier.h @@ -25,38 +25,18 @@ #include "BKE_modifier.h" -#include "intern/depsgraph_type.h" - struct ModifierData; namespace blender { namespace deg { -struct Depsgraph; - -/* Identifier used to match modifiers to backup/restore their runtime data. - * Identification is happening using original modifier data pointer and the - * modifier type. - * It is not enough to only pointer, since it's possible to have a situation - * when modifier is removed and a new one added, and due to memory allocation - * policy they might have same pointer. - * By adding type into matching we are at least ensuring that modifier will not - * try to interpret runtime data created by another modifier type. */ -class ModifierDataBackupID { +class ModifierDataBackup { public: - ModifierDataBackupID(const Depsgraph *depsgraph); - ModifierDataBackupID(ModifierData *modifier_data, ModifierType type); - - friend bool operator==(const ModifierDataBackupID &a, const ModifierDataBackupID &b); + explicit ModifierDataBackup(ModifierData *modifier_data); - uint64_t hash() const; - - ModifierData *modifier_data; ModifierType type; + void *runtime; }; -/* Storage for backed up runtime modifier data. */ -typedef Map<ModifierDataBackupID, void *> ModifierRuntimeDataBackup; - } // namespace deg } // namespace blender |