Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed some issues caused by dereferencing pointers to elements of an … #77

Merged
merged 1 commit into from
May 11, 2023

Conversation

mlavik1
Copy link
Contributor

@mlavik1 mlavik1 commented May 8, 2023

Fixed some issues caused by dereferencing pointers to elements of an std::vector that has since been re-allocated.

Some comments:

  • The _originalVertices doesn't have to be a member variable, since we only use it inside the processContours function. But it should be more efficient like this, since making it local to the function would cause it to re-allocate every time.
  • In vertexDataCallback: I replaced the if (vertex_data[i] != nullptr) with if (weight[i] > 0.0f), since we're no longer passing pointers but instead index values directly, and an index of 0 would cause the null-check to fail.

#76

…std::vector that has since been re-allocated.
@jklimke jklimke merged commit a22e75d into jklimke:master May 11, 2023
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