]> git.sesse.net Git - stockfish/commit
Remove make_bitboard()
authorprotonspring <mike@whiteley.org>
Sun, 17 Jun 2018 02:26:25 +0000 (20:26 -0600)
committerStéphane Nicolet <cassio@free.fr>
Tue, 26 Jun 2018 07:08:15 +0000 (09:08 +0200)
commitaf6072c8b7e849c43b69dc286bcc0de6d9b453a1
treeb71f194ab2534eea11fd5b5ef9340ccf528e0b00
parent1e9397a2df3094589540838b4e24342ac53c212a
Remove make_bitboard()

In current master, the function make_bitboard() does nothing apart from
helping initialize the SquareBB[] array. This seems like an unnecessary
abstraction layer.

The advantage of make_bitboard() is we can define a bitboard, in a simple
and general way, not only from a single square but also from a list of
squares. It is more elegant, faster and  readable than combining multiple
SquareBB explicitly, but the last complex use case in evaluation was
simplified away a few months ago.

If make_bitboard() becomes useful again to define complicated bitboards,
it will be easy enough to reintroduce it using this pull request as
an implementation reference.

No functional change.
src/bitboard.cpp
src/bitboard.h