Skip to content

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

Open
v-ein wants to merge 1 commit intohoffstadt:masterfrom
v-ein:bugfix/list-functions
Open

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

Conversation

@v-ein
Copy link
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant