diff options
author | Hans Goudey <h.goudey@me.com> | 2021-09-06 20:30:40 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-09-06 20:30:40 +0300 |
commit | 584af77101500fdc76b96ed40e9be1595398374f (patch) | |
tree | 38a553dbc02c9373efd6907b33d7fff59a9bc375 | |
parent | d53e400454bba48a0f2d2a58e008f993d0c469be (diff) |
Add assertion in FieldEvaluator for evaluation state
-rw-r--r-- | source/blender/functions/FN_field.hh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/functions/FN_field.hh b/source/blender/functions/FN_field.hh index 5b12e662f55..7de88f6298a 100644 --- a/source/blender/functions/FN_field.hh +++ b/source/blender/functions/FN_field.hh @@ -336,6 +336,13 @@ class FieldEvaluator : NonMovable, NonCopyable { { } + ~FieldEvaluator() + { + /* While this assert isn't strictly necessary, and could be replaced with a warning, + * it will catch cases where someone forgets to call #evaluate() */ + BLI_assert(is_evaluated_); + } + /** * \param field: Field to add to the evaluator. * \param dst: Mutable virtual array that the evaluated result for this field is be written into. |