fix: A regression in list functions introduced in PR #2613#2621
Open
v-ein wants to merge 1 commit intohoffstadt:masterfrom
Open
fix: A regression in list functions introduced in PR #2613#2621v-ein wants to merge 1 commit intohoffstadt:masterfrom
v-ein wants to merge 1 commit intohoffstadt:masterfrom
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.cppand brought a change where the code that was previously callingstd::vector::resize()is now callingreserve()instead. This is fine, but requires a different way of populating the vector - namely,emplace_backorpush_backinstead of assigning a value toitems[i]. Unfortunately in some places this was not changed and the code was still usingitems[i], breaking functions likereorder_items.This fix corrects the issue.
As a side effect, it also makes
reorder_itemsandget_valuesthrow 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.