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

Add missing const qualifiers, unify code style #163

Merged
merged 4 commits into from
Nov 9, 2021

Conversation

themmj
Copy link
Contributor

@themmj themmj commented Nov 6, 2021

The first change adds the const qualifiers I mentioned in Discord.

The second change makes the code more readable and unifies the style. There were some redundant things (like unnecessary ;, using this-> and unneeded copy constructions) and some inconsistencies in style (initialization of members in the constructor body or as an initializer list and where the curly braces are placed). Also added some whitespace to aid in readability or fix indentation mismatches. Overall just adjusted parts of the code to be in line with the rest.

I've not touched main.cpp to avoid merge conflicts for users.

If you want me to remove the second change from the PR and only keep the Position.hpp changes feel free to tell me. I just thought it might help.

@StoneT2000 StoneT2000 self-assigned this Nov 7, 2021
@themmj
Copy link
Contributor Author

themmj commented Nov 7, 2021

Added an explicit initialization of the CityTile pointer to fix #145

@StoneT2000
Copy link
Member

Code is ready to go! Just tested it on kaggle. Thanks!

@StoneT2000 StoneT2000 merged commit f7cff3c into Lux-AI-Challenge:master Nov 9, 2021
@themmj
Copy link
Contributor Author

themmj commented Nov 9, 2021

@StoneT2000 In case you need help to prepare the cpp kit for another season or challenge, I'd be willing to contribute again.

@StoneT2000
Copy link
Member

Thanks! We will consider reaching out before launching the next year's challenge's kits. Are you on discord? @themmj

@themmj
Copy link
Contributor Author

themmj commented Nov 9, 2021

Sweet. Yes its MMJ#3534 , we already had a small convo in the questions channel about the const qualifiers.

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