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

Small cleanups 01 #2532

Closed
wants to merge 1 commit into from
Closed

Conversation

vondele
Copy link
Member

@vondele vondele commented Jan 29, 2020

PR to collect small patches that are close to trivial.

No functional change

@vondele vondele mentioned this pull request Jan 29, 2020
@adentong
Copy link

adentong commented Jan 29, 2020

search.cpp line 1329, can get rid of bracket at the end around !PvNode && ttPv

@joergoster
Copy link
Contributor

#include <numeric> in bitbase.cpp is not needed.

@joergoster
Copy link
Contributor

joergoster commented Jan 29, 2020

In main.cpp, move #include "endgame.h" up and place it below #include "bitboard.h" to preserve alphabetical order.
And in endgame.h, move #include <unordered_map> down and place it above #include <utility>.
That's it.

@xoto10
Copy link
Contributor

xoto10 commented Feb 1, 2020

Remove redundant comment in evaluate.cpp

@TerjeKir
Copy link

TerjeKir commented Feb 2, 2020

Line 636 in position.cpp could use check_squares() instead of st->checkSquares[] directly

@snicolet
Copy link
Member

snicolet commented Feb 2, 2020

The comment "Greater bonus when landing square is occupied" near RestictedPiece can also be removed.

@protonspring
Copy link

the comment for shift doesn't seem accurate since we may shift more than one step.

@protonspring
Copy link

movegen.cpp, line 55. This comment can probably be removed.

@gvreuls
Copy link
Contributor

gvreuls commented Feb 3, 2020

Changing the signature of the new void* aligned_ttmem_alloc(size_t allocSize, void** mem) function into the more C++ idiom void* aligned_ttmem_alloc(size_t allocSize, void*& mem) would be nice, or is that too large a change?
misc.h line 36
misc.cpp lines 306-318
tt.cpp line 69
(Changing it into std::pair<void*, void*> aligned_ttmem_alloc(size_t allocSize) probably diverts too far from our coding style.)

@vondele
Copy link
Member Author

vondele commented Feb 5, 2020

the comment for shift doesn't seem accurate since we may shift more than one step.

file and line number please ?

Bench: 4869669
@protonspring
Copy link

protonspring commented Feb 5, 2020 via email

@vondele
Copy link
Member Author

vondele commented Feb 5, 2020

it is still one step in a direction D, but D happens to be two squares, so I think the comment is still right. Agree ?

@protonspring
Copy link

protonspring commented Feb 5, 2020 via email

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

8 participants