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

Fix MSVC warnings in monster.cpp/monsterdat.cpp #6842

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

obligaron
Copy link
Contributor

This PR reduces warnings by 20 (from 137 to 117)

Copy link
Member

@AJenbo AJenbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I'm sitting here wondering if we should have made getId() return unit8_t 🤔

@obligaron
Copy link
Contributor Author

Now I'm sitting here wondering if we should have made getId() return unit8_t 🤔

Yeah. It's a tricky one...

uint8_t could be a little bit too low, if we want to support more then 200 monsters.
Something larger would still need some casts (against size_t or int16_t for example in dMonster).

For now I use size_t until it gets stored in some structure that's also get saved or when doing network related stuff.

@AJenbo AJenbo merged commit d4a70a2 into diasurgical:master Nov 28, 2023
23 checks passed
@obligaron obligaron deleted the monwarning branch November 28, 2023 21:35
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