Closed themmj closed 2 years ago
Added an explicit initialization of the CityTile pointer to fix #145
Code is ready to go! Just tested it on kaggle. Thanks!
@StoneT2000 In case you need help to prepare the cpp kit for another season or challenge, I'd be willing to contribute again.
Thanks! We will consider reaching out before launching the next year's challenge's kits. Are you on discord? @themmj
Sweet. Yes its MMJ#3534 , we already had a small convo in the questions channel about the const qualifiers.
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
;
, usingthis->
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.