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 crash on unknown biome. #180

Merged
merged 2 commits into from
Aug 24, 2019
Merged

Fixed crash on unknown biome. #180

merged 2 commits into from
Aug 24, 2019

Conversation

madmaxoft
Copy link
Contributor

Fixes #179.

@madmaxoft
Copy link
Contributor Author

This is a hotfix for the problem so that it doesn't seem to happen anymore, but still technically the code is broken, because QHash is not guaranteed to be thread-safe. On the other hand, locking the hash for querying biome in every pixel would be too much of a performance hit.

@EtlamGit
Copy link
Collaborator

Could you please also make this method const?

@madmaxoft
Copy link
Contributor Author

madmaxoft commented Aug 24, 2019

Here you go.

(compile-checked only on MSVC 2017)

@EtlamGit
Copy link
Collaborator

Great! And you found even more methods to be set to const.

@madmaxoft
Copy link
Contributor Author

const usually grows like cancer, they had to be const-ed in order to use the const return value.

@mrkite mrkite merged commit a51f0f4 into mrkite:master Aug 24, 2019
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.

Weird crash on Win, 1.14 world
3 participants