Skip to content

Conversation

@mdaiter
Copy link

@mdaiter mdaiter commented Apr 30, 2019

The Makefile sometimes provides issues with temporary file generation and platform-specific compilers (g++). CMake should help alleviate these issues.

* symetric positions are printed only once.
*/
void explore(const Position &P, char* pos_str, const int depth) {
void explore(const Position &P, char* const pos_str, const int depth) {
Copy link
Author

Choose a reason for hiding this comment

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

Added a const-annotation to the pointer here to ensure memory safety and optimization

Copy link
Owner

Choose a reason for hiding this comment

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

This parameter is actually not const.
The code does not even compile with your suggestion.

Copy link
Author

Choose a reason for hiding this comment

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

Wait, the integer values are variable, but the pointer is const, no? I compiled on my machine and all of this worked;.

Copy link
Owner

@PascalPons PascalPons May 5, 2019

Choose a reason for hiding this comment

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

my bad, sorry I misplaced the const when copying the code.

@mdaiter
Copy link
Author

mdaiter commented May 6, 2019

@PascalPons , are we still trying to merge this? Wouldn't want the CMake file to go to waste.

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