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.
This commit is contained in:
parent
dba3fb9e09
commit
c18675b12c
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue