Hide global visibility when not needed

Also move PieceValue definition in psqt.cpp,
where it is initialized.

Fix a warning in popcount16() with Intel compiler

No functional change.
This commit is contained in:
Marco Costalba
2016-04-07 08:55:38 +02:00
parent bd04f9a0f1
commit d30994ecd5
5 changed files with 25 additions and 21 deletions

View File

@@ -78,7 +78,7 @@ namespace {
// popcount16() counts the non-zero bits using SWAR-Popcount algorithm
uint8_t popcount16(uint16_t u) {
unsigned popcount16(unsigned u) {
u -= (u >> 1) & 0x5555U;
u = ((u >> 2) & 0x3333U) + (u & 0x3333U);
u = ((u >> 4) + u) & 0x0F0FU;
@@ -152,7 +152,7 @@ const std::string Bitboards::pretty(Bitboard b) {
void Bitboards::init() {
for (unsigned i = 0; i < (1 << 16); ++i)
PopCnt16[i] = popcount16(i);
PopCnt16[i] = (uint8_t) popcount16(i);
for (Square s = SQ_A1; s <= SQ_H8; ++s)
{