Skip to content

fix: A regression in list functions introduced in PR #2613#2621

Merged
hoffstadt merged 1 commit intohoffstadt:masterfrom
v-ein:bugfix/list-functions
Mar 23, 2026
Merged

fix: A regression in list functions introduced in PR #2613#2621
hoffstadt merged 1 commit intohoffstadt:masterfrom
v-ein:bugfix/list-functions

Conversation

@v-ein
Copy link
Copy Markdown
Collaborator

@v-ein v-ein commented Mar 19, 2026


name: Pull Request
about: Create a pull request to help us improve
title: fix: A regression in list functions introduced in PR #2613
assignees: @hoffstadt


Description:
PR #2613 modified a number of list conversion functions in mvPyUtils.cpp and brought a change where the code that was previously calling std::vector::resize() is now calling reserve() instead. This is fine, but requires a different way of populating the vector - namely, emplace_back or push_back instead of assigning a value to items[i]. Unfortunately in some places this was not changed and the code was still using items[i], breaking functions like reorder_items.

This fix corrects the issue.

As a side effect, it also makes reorder_items and get_values throw an exception if a tag (not a numeric UUID!) is passed in that does not exist (earlier they would silently skip this error). If a non-existent UUID is passed it, it's still silently skipped, because this is a different code branch and I didn't want to touch it.

Concerning Areas:
None.

As a side effect, reorder_items and get_values can now throw an exception if one of the tags passed in does not exist (earlier they would silently skip it).
@v-ein v-ein requested a review from hoffstadt March 19, 2026 21:59
@hoffstadt hoffstadt merged commit 506bbda into hoffstadt:master Mar 23, 2026
4 checks passed
@v-ein v-ein deleted the bugfix/list-functions branch March 23, 2026 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants