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-06-04 01:06:14 +0300
committerHans Goudey <h.goudey@me.com>2021-06-04 01:06:31 +0300
commitc18675b12c66ccfc96079a67dc65a2eb978af7bd (patch)
tree8afc82b6590f4adbbb7efa73592975394419737e
parentdba3fb9e091acfa7d2144468a220b2b0d577c15d (diff)
Cleanup: Add comment explaining assert
This triggers fairly often during development, so it might save some frustration at some point to have a comment here.
-rw-r--r--source/blender/blenkernel/intern/attribute_access.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/attribute_access.cc b/source/blender/blenkernel/intern/attribute_access.cc
index 1495eb23254..f2ad873b10e 100644
--- a/source/blender/blenkernel/intern/attribute_access.cc
+++ b/source/blender/blenkernel/intern/attribute_access.cc
@@ -658,6 +658,7 @@ GVArrayPtr CustomDataAttributes::get_for_read(const StringRef name,
std::optional<GMutableSpan> CustomDataAttributes::get_for_write(const StringRef name)
{
+ /* If this assert hits, it most likely means that #reallocate was not called at some point. */
BLI_assert(size_ != 0);
for (CustomDataLayer &layer : MutableSpan(data.layers, data.totlayer)) {
if (layer.name == name) {