Skip to content

Fix overlapping WFC pattern lookup and set_pattern bugs#15

Open
AliasFactory wants to merge 2 commits into
math-fehr:masterfrom
AliasFactory:fix/get-pattern-id
Open

Fix overlapping WFC pattern lookup and set_pattern bugs#15
AliasFactory wants to merge 2 commits into
math-fehr:masterfrom
AliasFactory:fix/get-pattern-id

Conversation

@AliasFactory
Copy link
Copy Markdown

get_pattern_id() dereferences the find iterator (*pattern_id) which returns the pattern content rather than its index in the vector. Fixed by using std::distance() to return the actual index.

set_pattern() passes std::optional directly to the private set_pattern(unsigned, unsigned, unsigned) overload instead of extracting the value first. Fixed by using .has_value() and .value().

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.

1 participant