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

Better approach for avoiding allocations for distances during tile selection #302

Closed
kring opened this issue Aug 2, 2021 · 0 comments · Fixed by #450
Closed

Better approach for avoiding allocations for distances during tile selection #302

kring opened this issue Aug 2, 2021 · 0 comments · Fixed by #450
Labels
quality Improve code quality or encourage developer success

Comments

@kring
Copy link
Member

kring commented Aug 2, 2021

In #283, I hastily added some code to avoid allocating a vector<double> to hold distances for each visited tile every frame. It works ok, but it's pretty ugly. We should see if there's a better way to avoid the allocation, or at least clean it up by using a proper RAII object rather than the dodgy unique_ptr+lambda trick.

@kring kring added the quality Improve code quality or encourage developer success label Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality Improve code quality or encourage developer success
1 participant