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

Codechange: Improve NetworkAddress usage #7782

Closed
wants to merge 2 commits into from

Conversation

LordAro
Copy link
Member

@LordAro LordAro commented Oct 19, 2019

  • Make sure masterserver still compiles

@nielsmh
Copy link
Contributor

nielsmh commented Oct 19, 2019

I'm not sure I like the amount of const_cast and mutable going on, I'd rather leave it const-incorrect for now and find a different solution somehow. (So far it doesn't look like const correctness is solving an existing problem?)

@LordAro
Copy link
Member Author

LordAro commented Oct 19, 2019

I'll be honest, I'm not sure what the original intent of this patch queue was. I think the std::vector pointers, maybe?

Making NetworkAddress const correct was necessary for std::find, and I'm pretty sure I've run into it before

3 const_casts + 3 mutables vs only 2 const casts previously, but the object is now "more correct" conceptually, I think?

@LordAro
Copy link
Member Author

LordAro commented Nov 3, 2019

Not worth it until we have a proper reason to, i think

@LordAro LordAro closed this Nov 3, 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.

None yet

2 participants